Render CFM to string

Hi,
I have the following need. I am building a webservice that
needs to be deployed in some machines. I would like the client
machines to have very little to do with the processing of forms.
All the client does is invoke the webservice and it should return
the forms and validation.
Well, I have an app working well with cfinvoke method=....
however, I would like to make this work as a webservice too.
So, I suppose I need to be able to return something to the
client. However, I have come to learn that <cfinvoke .. doesn't
return anything to the client (as it should). The only thing going
back to the client is the returned variable.
So, I need to do all rendering a cfm into a string object
that I can return back to the client.
I just don't know how this can be done.
My other solution is to copy all the html + scripts from cfms
and put them in the cfc and add quotations. Well, That's not a bad
idea. But that's a bit silly if I have to copy the javascript
libraries and so on.
Any ideas on the matter are greatly welcomed,
Roland

I'm not 100% clear on what you are trying to do, but I think
the
<cfsaveContent...> tag could do what you need.
<cfoutput>
<cfSaveContent variable="foobar">
<html>
<head>
<title>A Test</title>
</head>
<body>
<p>#dateFormat(now(),"dd mmmm yyyy")#</p>
</body>
</html>
</cfSaveContent>
</cfoutput>
<cfoutput>#foobar#</cfoutput>

Similar Messages

  • Can I render facelet  to string in memory ?

    Hi,
    I've been working on porting an existing asp.net web app to a facelets based solution, and there is a particular method which is used quite frequently in the asp.net project. A component, with an ascx extension is loaded dynamically, and rendered to string, which is later either passed via ajax calls or used for decorating a portion of a page.
    Is it possible to render facelet composite components like this? Like passing a pojo to a composite control and rendering the output as string?
    Kind regards
    Seref

    Hi Nick,
    That's a valid suggestion for the LabVIEW developers (post it using the "feedback" link on ni.com/contact), but I'm afraid that it would invite customers to mess up things by not keeping references in a short leash and closing in the right order when done.
    In case you want the closest to this kind of feature, try the Request Deallocation function and place it inside the VI that holds the references. When that VI finishes and returns to the caller, all unused memory will be deallocated.
    - Philip Courtois, Thinkbot Solutions

  • SSRS 2012 Print Error w/ Win 8.1 IE11 (0x80004005)

    I'm having an issue printing SSRS 2012 reports from Win 8.1/IE11.  When I print I get "An error occurred trying to render the report. (0x80004005)"  See below for SSRS Log.  This happens when trying to print any reports from this
    server on a win 8.1 machine. I've checked on Win8/IE10 and Win7/IE11 and they both work fine.  When I change the "User agent string" in F12/Emulation to IE10 instead of default it also works fine.  These reports are in compatibility mode
    by default due to the "Dispaly intranet sites in Compatibility View" being checked by default.  If I uncheck this box the reports will not even run.  They display an error message of "Value cannot be null. Parameter name: String"
    which is very similar looking to the error in the log below.
    TIA for any help
    Tommy
    The error log from SSRS is
    webserver!ReportServer_0-15!14cc!06/11/2014-09:59:40:: e ERROR: Internal error: System.ArgumentNullException: Value cannot be null.
    Parameter name: String
       at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       at System.Web.Configuration.HttpCapabilitiesBase.get_MajorVersion()
       at Microsoft.ReportingServices.Diagnostics.Utilities.BrowserDetectionUtility.GetBrowserInfoFromRequest(HttpRequest request)
       at Microsoft.ReportingServices.WebServer.HttpRequestContext.get_BrowserCapabilities()
       at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.HttpRequestWrapper.get_BrowserCapabilities()
       at Microsoft.ReportingServices.Library.StreamRequestHandler.PopulateRSRequestParameters()
       at Microsoft.ReportingServices.Library.StreamRequestHandler.PerformStreamedOperation(StreamedOperation operation)
       at Microsoft.ReportingServices.Library.StreamRequestHandler.RenderItem(ItemType itemType)
       at Microsoft.ReportingServices.Library.StreamRequestHandler.ExecuteCommand()
       at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
    library!ReportServer_0-15!14cc!06/11/2014-09:59:40:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeException: ArgumentException is encountered. Check inner exception for details., Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeException:
    An error occurred in the HTTP Runtime object for application domain ReportServer_MSSQLSERVER_0-15-130469329522201322. Most likely, the HTTP request contains an unsupported verb or invalid syntax. ---> System.ArgumentNullException: Value cannot be null.
    Parameter name: String
       at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       at System.Web.Configuration.HttpCapabilitiesBase.get_MajorVersion()
       at Microsoft.ReportingServices.Diagnostics.Utilities.BrowserDetectionUtility.GetBrowserInfoFromRequest(HttpRequest request)
       at Microsoft.ReportingServices.WebServer.HttpRequestContext.get_BrowserCapabilities()
       at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.HttpRequestWrapper.get_BrowserCapabilities()
       at Microsoft.ReportingServices.Library.StreamRequestHandler.PopulateRSRequestParameters()
       at Microsoft.ReportingServices.Library.StreamRequestHandler.PerformStreamedOperation(StreamedOperation operation)
       at Microsoft.ReportingServices.Library.StreamRequestHandler.RenderItem(ItemType itemType)
       at Microsoft.ReportingServices.Library.StreamRequestHandler.ExecuteCommand()
       at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
       --- End of inner exception stack trace ---;
    ui!ReportManager_0-16!3cc!06/11/2014-09:59:40:: i INFO: Unhandled exception: Microsoft.Reporting.WebForms.ReportServerException: An error occurred in the HTTP Runtime object for application domain ReportServer_MSSQLSERVER_0-15-130469329522201322. Most likely,
    the HTTP request contains an unsupported verb or invalid syntax. (rsHttpRuntimeError) ---> Microsoft.Reporting.WebForms.ReportServerException: For more information about this error navigate to the report server on the local server machine, or enable remote
    errors
       --- End of inner exception stack trace ---
       at Microsoft.Reporting.WebForms.SoapReportExecutionService.ServerUrlRequest(AbortState abortState, String url, Stream outputStream, String& mimeType, String& fileNameExtension)
       at Microsoft.Reporting.WebForms.SoapReportExecutionService.Render(AbortState abortState, String reportPath, String executionId, String historyId, String format, XmlNodeList deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream,
    String& mimeType, String& fileNameExtension)
       at Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension)
       at Microsoft.Reporting.WebForms.ServerModeSession.RenderReport(String format, Boolean allowInternalRenderers, String deviceInfo, NameValueCollection additionalParams, Boolean cacheSecondaryStreamsForHtml, String& mimeType, String& fileExtension)
       at Microsoft.Reporting.WebForms.ServerModeSession.RenderReportForPrint(String deviceInfo, NameValueCollection additonalParams, HttpResponse response)
       at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Hi Joshua.Arenz,
    As per my understanding, you configured SSRS 2012 of SharePoint mode, when you click system setting in Central Admin, you got the error message.
    According to the error message, the Reporting Services service application is not configured correctly. Please make sure you created service application correctly by following steps:
    In SharePoint Central Administration, in the Application Management group, click Manage Service Applications.
    In the SharePoint toolbar, click the New button.
    In the New menu, click SQL Server Reporting Services Service Application.
    In the Create SQL Server Reporting Services Service Application page, enter a name for the application.
    In Application Pool section, create a new application pool for the application (recommended). Then select or create a managed account for the application pool.
    In the Database Server, you can use the current server or choose a different SQL Server.
    In Database Name the default value is ReportingService_<guid>, which is a unique database name. If you type a new value, type a unique value.
    In Database Authentication, the default is Windows Authentication.
    In the Web Application Association section, select the Web Application to be provisioned for access by the current Reporting Services Service Application.
    Click OK.
    For more information about Creating a new Reporting Services Service Application, please refer to the following document:
    http://niftit.com/how-to-install-configure-reporting-services-sharepoint-2013/
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Error while Exporting large data from Reportviewer on azure hosted website.

    Hi,
    I have website hosted on azure. I used SSRS reportviewer control to showcase my reports. while doing so i faced an issue.
    Whenever i export large amount of data as Excel/PDF/word/tiff it abruptly throw following error:
    Error: Microsoft.Reporting.WebForms.ReportServerException: The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at Microsoft.Reporting.WebForms.SoapReportExecutionService.ServerUrlRequest(AbortState abortState, String url, Stream outputStream, String& mimeType, String& fileNameExtension)
    --- End of inner exception stack trace ---
    at Microsoft.Reporting.WebForms.SoapReportExecutionService.ServerUrlRequest(AbortState abortState, String url, Stream outputStream, String& mimeType, String& fileNameExtension)
    at Microsoft.Reporting.WebForms.SoapReportExecutionService.Render(AbortState abortState, String reportPath, String executionId, String historyId, String format, XmlNodeList deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension)
    at Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension)
    at Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, String& mimeType, String& fileNameExtension)
    at Microsoft.Reporting.WebForms.ServerModeSession.RenderReport(String format, Boolean allowInternalRenderers, String deviceInfo, NameValueCollection additionalParams, Boolean cacheSecondaryStreamsForHtml, String& mimeType, String& fileExtension)
    at Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response)
    at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    It works locally (developer machine) or having less data. But it didn't work with large data when publish on azure.
    Any help will be appreciated.
    Thanks.

    Sorry, let me clarify my questions as they were ambiguous:
    For a given set if input, does the request always take the same amount of time to fail? How long does it take?
    When it works (e.g. on local machine using same input), how big is the output file that gets downloaded?
    Also, if you can share your site name (directly or
    indirectly), and the UTC time where you made an attempt, we may be able to get more info on our side.

  • R183 System Update - Scheduled to go live January 22nd, 2013

    We are announcing a new Business Catalyst release, scheduled to go live on January 22nd, 2013.
    Please refer to our official blog post for feature highlights and other major improvements slated for this release.
    Minor enhancements and cosmetic improvements
    Grid state persistence - with this release, most of the item lists displayed in the new admin user interface will remember the page and the sorting applied on a list when returning from a detail page
    Edit page properties in the new file manager - when editing a page in the new File Manager, users can now edit the page properties like SEO metadata, workflows, or page visibility
    Updated Email Marketing wizard - we have simplified the email campaign wizard and merged the Type and Details step into a single one, updated the controls for setting up one-off and loyalty campaigns and moved the Email Campaign subject into the content tab
    Secure domain redirects - starting with this release, all sites will have this feature turned on; if you redirect users to external websites, you should add those into the Secure Domain Redirect list
    SPAM improvements - comment workflow emails are no longer sent when a comment is marked as SPAM
    Limit the comment size - Starting with this release we will be limiting the number of characters per comment to 4000
    URL Redirects have been moved from Page Details into Site Settings menu
    Display how many subscribers are into a Secure zone in the secure zone list view
    Renamed Advanced View tab from pages screen into List View and made it default for new sites
    After sending a Campaign, don't show an error when redirected to the Stats tab
    Site Manager > Pages - Advanced view buttons don't have the same height. Might be reproducible in other screens as well.
    Updated styling for Find a Customer link found in some CRM screens
    Updated styling for date picker in filters
    Fixed icons alignment in the left menu + redesign some icons to be more relevant to the menu entry
    Fixed footer spacing in some screens (it's not always the same)
    Page status (draft/live) was sometimes shown in grey
    Table list headers font-size is not the size in specs (all over the UI)
    Consistency improvements for links color (we had 5 different tones of blue, now we have just one as in specs)
    Site Manager > Page Details - Breadcrumb has the correct caption Pages instead of Web Pages
    Web Forms field categories wrap on the second line when the window is resized although the screen is optimized for low resolutions screens.
    Wizard tabs have different colors depending on the screen.
    Issues fixed by January release
    Issue #
    Description
    3157574
    Updated catalog import to fix an issue causing the import to generate incorrect URLs when more than one sub catalogs were created
    3164429
    Enforced shipping tax validation to prevent site customers from bypassing the shipping tax payment
    3343967
    Updated the Site Setting > File Manager to prevent users from creating folders that contain  # in their name
    3365127
    Fixed an issue on list views that was causing an incorrect datetime sort (was sorting alphabetically by date instead of actual date)
    3373342
    Fixed an issue that intermittently generated an error when when accessing the BC Toolbox panel, via the   admin console
    3377475
    Updated secure zone login to prevent an "Secure Zone Access Expired" error being displayed  when trying to log in a secure zone in some cases
    3430574
    Fixed an issue causing muCommander to corrupt files on upload using SFTP
    3430529
    Fixed a file system issue that was not preventing SFTP clients from retrieving missing or corrupt files on the remote storage and overwrite the client local files
    3428565
    Fixed an issue preventing users from connecting to sites on SFTP, using FireFTP
    3430571
    Fixed some issues causing CuteFTP and muCommander for Mac to corrupt files on   upload
    2908470
    Updated {tag_recipientfirstname} so that it will render an empty string instead of "Recipient" if first name is empty
    2567870
    Updated the Dynamic Menu sorting functionality to fix an issue that was causing menu items to intermittently skip a few places
    2567955
    Fixed an issue causing state tax to not be covered by the gift voucher payments on some   occasions
    2567515
    Fixed an issue causing the Web App Edit Layout to not populate checkboxes that have   the ampersand & in the name
    2753571
    Creating a new Free Shipping Type Option hides all other   pre-configured shipping options in front-end for all the sub-domains of a   website
    3227500
    Fixed "Add RSS channels to a WebPage" and "Get RSS   HTML code" links from the "Actions" dropdown list  in the new admin user interface
    3344567
    Fixed an issue preventing the get RSS HTML code link from working on the new admin user interface
    3220522
    Returning URL for DIBS payment gateway blank
    3217223
    Fixed an issue causing incorrect data to be displayed when using affiliate program tags: {tag_referralslastmonth} and   {tag_referralslastweek}
    3343296
    Fixed a an issue causing the line item descriptions displayed on a packaing slip layout to be mis-aligned
    2801224
    Updated tag_productlist sorting. The sortBy parameter can now accept "releasedate" and "expirydate" parameters.  We also added the ability to sort ascending or descending for any sort type. Example: in order to sort by release date ascending, use "releasedate asc". In order to order by expiry date descending use "expirydate desc" or simply "expirydate" which will work as before (dates are descending by default).
    Deprecated functionality
    {tag_tellafriend} and {tag_tellafriendurl} will no longer be available for use in email campaigns. Existing campaigns will continue to work as designed.

    Issues:
    1. The ecommerce Stock attribute beta is live with the bugs reported in beta. Including the main one where if you have products with stock attributes, despite them rendering in the export file you can never import products back into the system because of stock sku features. Deleting all products allows you to upload with all sku information as a work around but on some uploads stocks are reset to 0.
    2. Intermintant permission issues creating folders that have same name as web apps.
    3. Can not make folders in BC editor (under develop) that are existing web apps
    4. If you move a pre existing page via FTP into a new created web app folder and rename it to index.html It will not work. In the admin it has no file extension so you have to add it there.
    5. Just had it confirmed by live chat support who replicated it on a demo site. Securezone update details form with custom CRM fields.
    CRM fields will render current data but will not update the custom CRM fields in the crm on submission of the form.

  • How to use ZoneView in a JTextArea or JTextPane?

    i would like to view an large file (25MB with about 600.000 rows) in a JTextArea or JTextPane. As I know the JTextArea creates for each line of the document at least one object, due to this fact it consumes about 330MB (for the file mentioned above) of memory and is useless. Now i found the ZoneView/AsyncBoxView for displaying and consuming memory only for the zone which has to be displayed. But how can i use the ZoneView in a JTextArea? Any examples?
    Thanx,
    Oliver

    Hi Folks:
    I would like some examples of using ZoneView as well. I read 1Mb files and convert them to strings and them attempt to render that entire string onto a JTextPane. As I understand it, ZoneView will improve the time to render the string on the JTextPane.
    My code is something like:
    final String fileToString = readInput();
    textPane.setText(fileToString);
    //readInput() is a file reader method
    The files (or strings) have upwards of 1000 lines; this takes a coupla minutes to render on a text pane.
    Hopefully they will post an example of ZoneView soon. Or maybe put it on the Question of the Week?!
    -Ben

  • Date Format in servlet when i insert into database

    I am inserting data into database through servlet, but i am getting NumberFormat Exception, and my datatype in database is DATE ,when i typecast my day and year because they r in int and changing into String,still i am getting the same error .So please can any one tell me where to cahnge the format of date and how to type cast to my Date format of database.
    Thanks,
    lalitha

    My code is:import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.text.*;
    import java.sql.Date;
    import java.util.*;
    public class RegisterServlet extends HttpServlet
         Connection con;
         PreparedStatement ps;
    public void init(ServletConfig sc) throws ServletException
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         con=DriverManager.getConnection("jdbc:odbc:plk","scott","tiger");
         System.out.println("connection created");
         catch(Exception e)
         System.out.println(e);
    public void doPost(HttpServletRequest req, HttpServletResponse res)
         try
         res.setContentType("text/html");
         PrintWriter pw= res.getWriter();
    String ulogin=req.getParameter("login").trim();
    String uph1=req.getParameter("ph1").trim();
    int ph1=Integer.parseInt(uph1);
    String upass=req.getParameter("pass").trim();
    String uph2=req.getParameter("ph2").trim();
    int ph2=Integer.parseInt(uph2);
    String cpass=req.getParameter("cfm").trim();
    String uweb=req.getParameter("web").trim();
    String ufirst=req.getParameter("first").trim();
    String uaddress=req.getParameter("address").trim();
    String umiddle=req.getParameter("middle").trim();
    String ucity=req.getParameter("city").trim();
    String ulast=req.getParameter("last").trim();
    String uzip=req.getParameter("zip").trim();
    int zip=Integer.parseInt(uzip);
    String ud=req.getParameter("Aday").trim();
    String um=req.getParameter("Amonth").trim();
    String uy=req.getParameter("Ayear").trim();
    SimpleDateFormat din=new SimpleDateFormat("dd-mm-yyyy");
    SimpleDateFormat dout=new SimpleDateFormat("yyyy/mm/dd");
    String txtDate="2001-07-07";
    Date date=din.parse(txtDate);
    java.sql.Date dt=new java.sql.Date(txtDate);
    dout.format(dt);
    String usex=req.getParameter("sex").trim();
    String uemail=req.getParameter("email").trim();
    String ust=req.getParameter("st").trim();
    String ucty=req.getParameter("cty").trim();
    ps=con.prepareStatement("insert into Userdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
    ps.setString(1,ulogin);
    ps.setString(2,uph1);
    ps.setString(3,upass);
    ps.setString(4,uph2);
    ps.setString(5,cpass);
    ps.setString(6,uweb);
    ps.setString(7,ufirst);
    ps.setString(8,uaddress);
    ps.setString(9,umiddle);
    ps.setString(10,ucity);
    ps.setString(11,ulast);
    ps.setString(12,uzip);
    ps.setDate(13,dt);
    ps.setString(14,usex);
    ps.setString(15,uemail);
    ps.setString(16,ust);
    ps.setString(17,ucty);
    int i=ps.executeUpdate();
    if(i==1)
    pw.println("<h3><center> Thankyou! Your details have been stored. </center></h3>");
    res.sendRedirect("http://localhost:8080/SeekLogin.html");
    pw.close();
    else
         pw.println("<h3><center>Sorry! you are not registered properly. </center></h3>");
    pw.close();
    catch(Exception e)
         System.out.println(e);
    Can anyone look this code and help me out where i am doing the mistake.
    Thanks.

  • Play a specific part of a timeline

    I found this topic which is really close:
    Play a specific part of a timeline
    I have 4 objects sitting in a circle. Similar to a compass. When I click on one of the objects, it should move in a circular path to the topmost position (north). It can go clockwise or counter-clockwise (whichever is closer) in order to get to the north position.
    I was using labels and can use play("symbol_name") to start at the right time. but if I follow that command with stop(X) where X is a point on the timeline, it immediately jumps to that point instead of traveling the timeline to get there. It basically ignores the circular animation and jumps to the final destination.
    I can't put stop() on the timeline as a trigger because an object may need to pass over it. For example, I want to move object 1 from point A to D (skipping B and C). If I had stop() triggers at B and C, I could never get the animation to play from A-D.
    BTW the objects are grouped together as a symbol and so when I click one of the objects, I am actually rotating the parent and then rotating its children the same amount in the opposite direction.
    Any suggestions? Thanks.

    Thanks Vivekuma,
    I have uploaded the project here:
    edge3.zip - Google Drive
    Only the clock, people and the monitor icons have click behaviors now. As a reminder,  the goal is that when I click on an icon, I want it to rotate to the north position (choosing clockwise or counter-clockwise depending on which is the shortest route).
    It's working on the first click with the monitor icon (by first click I mean after a screen refresh). But on first click with the clock where I am using playReverse, it plays to the next trigger and then and then does a play (not reverse). I think that is because it gets to the trigger and then I am issuing a play command instead of continuing the existing playReverse command. So instead of a play command at each trigger, I guess what I need is a "continue" action that just allows it to keep going. Is there such a thing?
    Also, notice this: refresh, click the monitor and then click the monitor again. The first click should take it to the north position. Clicking again should just stay there but instead it goes to the home position.
    Lastly, is there a way to render a type string on the page that just shows the current position (time and label)? Thanks,
    Mat

  • Wordwrap nodes in jtree

    Anyone know how we can do wordwrap of nodes in jtree?
    Please help...
    Thanks.

    Any example on this? what html code should I use? The simplest possible, eg
    yourNode.setText("<html>" + yourNodeText + "</html>");Most JComponents can render this html string and produce a good result. But if you wanna get a little more complex and use styles and other web things, then do as said, (two posts above) and use a JEditorPane specifically for cell renderer
    ICE

  • Hiding POSTed parameters in v2

    Hi:
    I have a portal which contains tabbed pages. My problem is that within those tabbed pages I have jsp portlets which contain forms. When I submit the form, the data gets posted correctly, but when I change to another tabbed page, all the form variables are submitted in the URL to the new page. How do I prevent POSTed form variables from being added to the URL??
    Regards
    Gareth Cantrell

    I'm using 9iAS 9.0.2
    I used an example from PDK January
    here is the JSP (bank.jsp):
    <%@page import="java.util.*, oracle.portal.provider.v2.*" %>
    <%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRendererUtil" %>
    <%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %>
    <%@page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil" %>
    <%
    String paramAmount = "Amount";
    String paramAction = "Action";
    PortletRenderRequest portletRequest =
    (PortletRenderRequest) request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    %>
    <b>This portlet shows how to use the passUrlParams flag and
    unqualified, transient parameters to perform a portlet action.</b>
    // The account transfer is performed by submitting the following form
    <form method="POST" action="<%= HttpPortletRendererUtil.htmlFormActionLink(
    request,PortletRendererUtil.PAGE_LINK) %>">
    <%= HttpPortletRendererUtil.htmlFormHiddenFields(request,PortletRendererUtil.PAGE_LINK) %>
    <table>
    <tr>
    <td>
    <b>Amount $</b>
    </td>
    <td>
    <input type="text" size="20" name="<%= paramAmount %>" value="">
    </td>
    </tr>
    </table>
    <br>
    <INPUT TYPE=submit name="<%= paramAction %>" Value="Transfer">
    </form>
    // Parse the inputs to see if a transfer should be performed
    <%
    if (portletRequest.getParameter(paramAction) != null)
    String submittedAmount = portletRequest.getParameter(paramAmount);
    if (submittedAmount == null || submittedAmount.trim().length() == 0)
    %>
    <b>Please specify an amount!</b>
    <%
    else
    try
    double amount = Double.valueOf(submittedAmount).doubleValue();
    if (amount != 0)
    %>
    <b>Successfully transferred $<%=submittedAmount%>.</b>
    <%
    catch (NumberFormatException e)
    %>
    <b>Invalid amount.</b>
    <%
    %>
    here is my provider.xml:
    <?xml version="1.0" encoding="ISO-8859-2" standalone="yes"?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>Parampass</name>
    <title>Parampass</title>
    <shortTitle>Parampass</shortTitle>
    <description>Parampass portlet.</description>
    <timeout>240</timeout>
    <timeoutMessage>Parampass portlet timed out.</timeoutMessage>
    <showLink>false</showLink>
    <showEdit>false</showEdit>
    <showEditToPublic>false</showEditToPublic>
    <showEditDefault>false</showEditDefault>
    <showPreview>true</showPreview>
    <showDetails>false</showDetails>
    <hasHelp>false</hasHelp>
    <hasAbout>false</hasAbout>
    <acceptContentType>text/html</acceptContentType>
    <defaultLocale>hu.HU</defaultLocale>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage>parampass.jsp</showPage>
    <pageParameterName>parampass_next_page</pageParameterName>
    </renderer>
    </portlet>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>2</id>
    <name>Paramrecv</name>
    <title>Paramrecv</title>
    <shortTitle>Paramrecv</shortTitle>
    <description>Paramrecv portlet.</description>
    <timeout>240</timeout>
    <timeoutMessage>Paramrecv portlet timed out.</timeoutMessage>
    <showLink>false</showLink>
    <showEdit>false</showEdit>
    <showEditToPublic>false</showEditToPublic>
    <showEditDefault>false</showEditDefault>
    <showPreview>true</showPreview>
    <showDetails>false</showDetails>
    <hasHelp>false</hasHelp>
    <hasAbout>false</hasAbout>
    <acceptContentType>text/html</acceptContentType>
    <defaultLocale>hu.HU</defaultLocale>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage>paramrecv.jsp</showPage>
    <pageParameterName>paramrecv_next_page</pageParameterName>
    </renderer>
    </portlet>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>3</id>
    <name>Bank</name>
    <title>Bank</title>
    <shortTitle>Bank</shortTitle>
    <description>Bank portlet.</description>
    <timeout>240</timeout>
    <timeoutMessage>Bank portlet timed out.</timeoutMessage>
    <showLink>false</showLink>
    <showEdit>false</showEdit>
    <showEditToPublic>false</showEditToPublic>
    <showEditDefault>false</showEditDefault>
    <showPreview>true</showPreview>
    <showDetails>false</showDetails>
    <hasHelp>false</hasHelp>
    <hasAbout>false</hasAbout>
    <acceptContentType>text/html</acceptContentType>
    <defaultLocale>hu.HU</defaultLocale>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage>bank.jsp</showPage>
    <pageParameterName>bank_next_page</pageParameterName>
    </renderer>
    </portlet>
    </provider>
    When I press the submit button, the transient parameters are passed, but when I refresh the page the transient parameters are also passed.
    When I make two TAB pages in the portal, and navigate between them, the behavior is the same.
    Here is my URL after opening the tab page in a new navigator window:
    http://portal2.eurotrend.hu:7777/portal/page?_pageid=73,31262,73_35033&_dad=portal&_schema=PORTAL&Amount=50&Action=Transfer
    You can see the transient parameters in the URL!
    I click the tab after submit.
    This happens in IE 5.5 and IE 6.0
    Thanks in advance!

  • [Formatter2] XExpression in a single line only

    Hi,
    My language is derived from XBase and and its formatter is thus derived from XBase formatter.
    The only difference is that I want XBase expressions to hold on a single line
    and remove the support of multiline.
    Overriding all the methods from the XBase formatter would be very tedious and generate a lot of redundant code.
    Anybody knows an elegant/working method to achieve that ?
    Thank you.

    And the code to render to a String (you need Guava):
    static class TextReplacementComparator implements Comparator<ITextReplacement> {
    override compare(ITextReplacement o1, ITextReplacement o2) {
    if(o1.offset<o2.offset) return -1
    else return 1
    def String getFormattedEObject(EObject eobject, extension IFormattableSubDocument sfd) {
    val txt = eobject.regionForEObject.text
    format(eobject, sfd)
    val replacements = sfd.renderToTextReplacements()
    Collections.sort(replacements, new TextReplacementComparator());
    var inFormattingText = txt
    var adjustment = 0
    for (ITextReplacement itr : replacements) {
    val replacingText = itr.replacementText
    val replacedText = itr.text
    val oldOffset = itr.offset - eobject.regionForEObject.offset + adjustment
    inFormattingText = FormattingUtils.replace(inFormattingText,oldOffset,itr.length,replacingText)
    adjustment = adjustment + (replacingText.length-replacedText.length)
    return inFormattingText
    //return FormattingUtils.removeCRLFTs(inFormattingText)
    }

  • How to see multilanguage data in forms9i

    Dear All,
    I have installed 9i Developer Suite & 9i database in the same machine.our application has to display multilanguage data like malay,chinese and english.our database is character set is AL32UTF8. Also I have set NLS_LANG=AMERICAN_AMERICA.UTF8 in associate home (In the Regedit both client & server home)
    I have create the table which has datatype varchar2 & nvarchar2. Also I have inserted chinese character into
    both columns based on this table . Now i have created the sample form after running that form against web.i couldn't see the data in their chinese languages. I am able to see only junk data (some square boxes).basically 9i we can run only against web. for that Even i have set it NLS_LANG = SIMPLIFIED CHINESE.ZHS16GBK in the \oracle\orad2k\forms90\server\default.env file. Also In the default browser I have given
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">.Still i could not see the chinese data.
    What should i do to see the data in their chinese languages. Please help me it is very very urgent for me.
    Thanks in advance
    Pavendhan.N

    Hi,
    actually if you see data garbaged then this points to a wrong character set used for the application. on the Web Forms9i uses the NLS setting that is defined in the default.env file in the forms90/server directory. Since you only can set one NLS parameter you should look for a character set that can render all language strings you use.
    Frank

  • G.drawString and increase character offset?

    Can I modify the character offset value being used in g2d.drawString method?
    I want to have more space between characters in a string.
    I've tried Google and JavaDoc to find a solution, but failed.

    import java.awt.*;
    import java.awt.font.*;
    import java.text.*;
    import javax.swing.*;
    public class WidthExample extends JPanel {
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) g;
            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
            g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
            String text = "The quick, brown fox jumped over the lazy dog.";
            render(g2, text, 10, 30, TextAttribute.WIDTH_CONDENSED);
            render(g2, text, 10, 60, TextAttribute.WIDTH_SEMI_CONDENSED);
            render(g2, text, 10, 90, TextAttribute.WIDTH_REGULAR);
            render(g2, text, 10, 120, TextAttribute.WIDTH_SEMI_EXTENDED);
            render(g2, text, 10, 150, TextAttribute.WIDTH_EXTENDED);
        void render(Graphics2D g, String text, int x, int y, Object widthValue) {
            AttributedString as = new AttributedString(text);
            as.addAttribute(TextAttribute.FAMILY, "Lucida Bright");
            as.addAttribute(TextAttribute.SIZE, new Float(20));
            as.addAttribute(TextAttribute.WIDTH, widthValue);
            TextLayout tl = new TextLayout(as.getIterator(), g.getFontRenderContext());
            tl.draw(g, x, y);
        public static void main(String[] args) {
            JComponent comp = new WidthExample();
            JFrame f = new JFrame("WidthExample");
            f.getContentPane().add(comp);
            f.setSize(720,300);
            f.setLocationRelativeTo(null);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setVisible(true);
    }

  • Emulation of browser font rendering metrics

    I am completely new to using java2d. I need to determine where a string rendered on a windows browser (e.g., IE) in a known font in a known width would line break, and also how much vertical space it requires to render the entire string. Obviously, this is based on certain assumptions, such as the user leaving "text size" in the default setting in the browser.
    I have run some experiments to understand this. First, I wrote a small HTML file to use as a benchmark:
    <html>
    <body>
    <table cellspacing="0" style="margin:0px;padding:0px;">
    <tr>
    <td style="vertical-align:top;width:600px;">
    <p style="margin:0px;padding:0px;font-family:arial;font-size:10pt;">
    aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az
    ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz
    ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx cy cz
    da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz
    </p>
    </td>
    </table>
    </body>
    </html>I found the following code and ran it just to see what it would do, using the HTML file shown above:
    // HTMLExample.java
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    public class HTMLExample
        public static void main(String[] args)
            JEditorPane pane = null;
            try
                pane = new JEditorPane("file:///C:/browser.html");
            catch (IOException ex)
                ex.printStackTrace(System.err);
                System.exit(1);
            pane.setEditable(false);
            final JEditorPane finalPane = pane;
            pane.addHyperlinkListener(new HyperlinkListener()
                public void hyperlinkUpdate(HyperlinkEvent ev)
                    try
                        if (ev.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
                            finalPane.setPage(ev.getURL());
                    catch (IOException ex)
                        ex.printStackTrace(System.err);
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setContentPane(new JScrollPane(pane));
            frame.setSize(600, 400);
            frame.setVisible(true);
    }Not impressed, looks nothing like IE rendition (or FireFox, which looks the same as IE). The font is way too small.
    Then I found some code that uses LineBreakMeasurer. I don't really need to render anything, just to understand the specifics of where the string would break and how tall the bounding box is for the lines that have been broken. Again, remember that I am new to this, but I found that if I want to render a 10pt arial font that appears the same size as text rendered in the browser, I have to specify 13pt. The horizontal width for breaking the lines seems to need no such adjustment. However, I did notice a slight difference in character widths and a definite difference in line height/spacing. The following code is my variation on an example I found to illustrate this.
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.font.FontRenderContext;
    import java.awt.font.LineBreakMeasurer;
    import java.awt.font.TextAttribute;
    import java.awt.font.TextLayout;
    import java.awt.geom.Point2D;
    import java.awt.image.BufferedImage;
    import java.text.AttributedCharacterIterator;
    import java.text.AttributedString;
    import java.util.Vector;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    public class FontText extends JComponent
        BufferedImage buf;
        TextLayout layouts[];
        Point2D.Float penPositions[];
        public FontText(String text, String fontFamily, int pointsize, int maxWidthInPixels)
            int realPointsize = (int) (pointsize * (1 + 1. / 3.)); // magic heuristic
            Font font = new Font(fontFamily, Font.PLAIN, realPointsize);
            AttributedString str = new AttributedString(text);
            str.addAttribute(TextAttribute.FONT, font);
            str.addAttribute(TextAttribute.FOREGROUND, Color.black);
            AttributedCharacterIterator iter = str.getIterator();
            FontRenderContext frc = new FontRenderContext(null, true, true);
            LineBreakMeasurer measurer = new LineBreakMeasurer(iter, frc);
            float wrappingWidth = maxWidthInPixels;
            float curY = 0;
            Vector vLayouts = new Vector();
            Vector vPenPositions = new Vector();
            TextLayout layout = null;
            Point2D.Float penPosition = null;
            while (measurer.getPosition() < iter.getEndIndex())
                int nextOffset = measurer.nextOffset(wrappingWidth);
                layout = measurer.nextLayout(wrappingWidth);
                curY += (layout.getAscent());
                penPosition = new Point2D.Float(0, curY);
                vPenPositions.addElement(penPosition);
                vLayouts.addElement(layout);
                curY += layout.getDescent() + layout.getLeading();
            layouts = new TextLayout[vLayouts.size()];
            vLayouts.copyInto(layouts);
            penPositions = new Point2D.Float[vPenPositions.size()];
            vPenPositions.copyInto(penPositions);
            Point2D.Float lastPosition = penPositions[penPositions.length - 1];
            TextLayout lastLayout = layouts[layouts.length - 1];
            int bw = maxWidthInPixels;
            int bh = (int) (lastPosition.y + lastLayout.getDescent());
            buf = new BufferedImage(bw, bh, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g = buf.createGraphics();
            for (int i = 0; i < layouts.length; i++)
                layouts.draw(g, penPositions[i].x, penPositions[i].y);
    g.dispose();
    setPreferredSize(new Dimension(bw, bh));
    public void paint(Graphics g)
    g.drawImage(buf, 0, 0, null);
    public static void main(String args[]) throws Exception
    String text = "aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az "
    + "ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz "
    + "ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx cy cz"
    + "da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz";
    new SnippetFrame(new FontText(text, "arial", 10, 600));
    public static class SnippetFrame extends JFrame
    public SnippetFrame(JComponent cmp)
    super();
    getContentPane().add(cmp);
    getContentPane().setBackground(Color.white);
    pack();
    addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent evt)
    System.exit(0);
    setVisible(true);
    Question: I need [i]exactly to emulate the browser's breaking and rendering of text without actually rendering the text. The information I need is:
    - where in the string are the line break points (this code finds those)?
    - what will the height (in pixels) be of the rendered lines?
    Any help is appreciated.
    Dean Hoover                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Somehow the p tags got lost in the HTML example. The first line after the td is the <p style=. And then after the content, there is supposed to be a closing </p>I had to do HTML escaping to show this.
    Dean Hoover

  • Can I install Coldusion Developer Version and XAMPP on the same computer?

    I'm trying to teach myself ColdFusion and I need a testing enviroment to play around in.
    I already have XAMPP installed on my computer. Do I need to delete XAMPP in order to install ColdFusion locally?
    Thanks.

    Hi,
    It's great that you're learning ColdFusion, you can install ColdFusion without uninstalling XAMPP. You can select the built in port to install ColdFusion which is default 8500 incase this port is already in use it can detect the next available port. Once you will install ColdFusion you can use ColdFusion webroot to render cfm pages.
    Hope this helps.
    Thanks,
    Priyank

Maybe you are looking for

  • Purchase Register Report

    Hi Friends,          I need to develop the Purchase Register Report with Vendor details, TIN number, Invoice details, E1 purchases with purchase base value and VAT and CST percentages. But Iam new to the Purchase module. I know the basic tables for p

  • Custom error messages - resource bundle

    Greetings everyone! My JDev version is:  11.1.2.3.0 I've seen several threads in OTN and outside about this topic, but they seem confused (or may be it's me that is missing something). I have this current situation, when because of the presence of a

  • IPad 2 HDMI Adapter - Max Cable Distance

    I work as a A/V Specialist at a local university. Currently we are running the majority of new projectors with HDMI. Since the iPad 2 has come out with its mirroring feature via the HDMI adapter, professors want to be able to plug their iPads into ou

  • No Folio File field in Viewer Builder?

    For some reason I do not have a field to associate a folio file to a viewer in the Viewer Builder. This greatly impairs the user experience. I'm using Indesign 5.5, have downloaded the most recent updates from the DPS site and have cleared the cache

  • Best file format for 8mm home movie conversion

    Hi there, I'm about to get some old 'standard' 8mm home movies from the 60s & 70s converted to DVD as a Christmas gift for my mum. The transfer company will also supply the footage as files to view/edit on my mac at a later date. I'm a complete iMovi