UIX:  messageCheckBox - "Unparseable number: "On".

I use a messageCheckBox to set values that will be posted to a database field of type Number(1). I expect it to post a 1 if the checkbox is selected. Here is the UIX tag:
<bc4j:messageCheckBox id="idKUTD" name="Kutd" attrName="Kutd" prompt="KUTD" selectedValue="1" value="1"/>
I have tried a number of combinations of setting parameters without success.
However, when I select the checkbox and attempt to post it I get the error - Unparseable number: "On"
Any help will be appreciated.

You can try something like this:
<bc4j:messageCheckBox name="mCB2"
prompt="Employee No."
attrName="Empno"
checked="true">
<boundAttribute name="value">
<bc4j:attrValue name="Empno"/>
</boundAttribute>
<boundAttribute name="text">
<bc4j:attrValue name="Ename"/>
</boundAttribute>
</bc4j:messageCheckBox>

Similar Messages

  • UIX/BC4J:  messageCheckBox - Unparseable number: "On"

    I use a messageCheckBox to set values that will be posted to a database field of type Number(1). I expect it to post a 1 if the checkbox is selected. Here is the UIX tag:
    <bc4j:messageCheckBox id="idKUTD" name="Kutd" attrName="Kutd" prompt="KUTD" selectedValue="1" value="1"/>
    I have tried a number of combinations of setting parameters without success.
    However, when I select the checkbox and attempt to post it I get the error - Unparseable number: "On"
    Any help will be appreciated.

    Here is my latest effort:
    <bc4j:messageCheckBox id="idRPACCESS" name="Rpaccess" attrName="Rpaccess" prompt="BPN ETIP Access" selectValue="T" value="T">
    <boundAttribute name="text">
    <bc4j:attrValue name="Rpaccess"/>
    </boundAttribute>
    </bc4j:messageCheckBox>
    I changed the RPACCESS database field to be VARCHAR2(10) to see what would be written to the database.
    UIX writes the word "on" to the database when the checkbox is checked.
    The documentation says that the value of the parameter "value" should be written to the database.
    If I manually set the database field RPACCESS to "T" then selectedValue causes the checkbox to be checked.
    When I deselect the checkbox the value is set to null in the database.
    If I reselect the checkbox the word "on" gets sent to the database.
    This, of course, hoses everything up.
    Is this a bug or am I missing something.

  • Error type mismatch unparseable number

    we are upgrading to crystal 2008 and i am running my report thru info view using activex viewer  - i have some parameters that i check set to null values when i do this i get the following
    error
    error type mismatch unparseable number
    this report calls a store procedure
    has anyone seen this error

    Hi Dilia,
    I'm not sure if I understand you correct. You are upgarding to CR2008 but running your reports through infoview active X viewer. Do you mean you created your reports in CR2008 and exported them to your BOE XIR3 enterprise system and you face the problem there?
    Coudl you clarify this please and let me know which BOE version you use?
    Re. the stored procedure....
    If you got a SP with IN parameters (see example below) please make sure you handle actually parameters with NULL values in your SP.
    Create procedure test (IN Name VARCHAR(30))
    P1:BEGIN
         DECLARE CURSOR ....
         IF (NAME IS NULL) THEN
             set dynstatement = 'select * from testtable';

  • Checkbox UIX

    I'm trying to get the UIX MessageCheckBox to bind to my data value. The field that I'm binding to is a string field that may contain a 'T' or a 'F' value.
    I set the selectedValue property to "T" on the checkbox and I have tried setting the model property to
    "${ui:cond(uix.current.bindings.myField=='T',true,false)}".
    As a test, I was able to define a boolean data value and the UIX MessageCheckBox works correctly with "true" and "false".
    Do I need to create a DataObject for my checkbox fields and inspect the value and return a boolean value?
    Thanks

    Is there a FAQ list I could look at?

  • Validating monetary input fields

    Hi. We are developing a web site that supports English and French. Some of the web pages have forms where the user must enter monetary values. Since English and French monetary values use different formats, I am wondering if there's a Java API (that hasn't been deprecated or is obsolete) that would perform validation of these monetary values for us rather than us having to write these from scratch (granted, it would not be overly difficult)? I looked through the Internationalization tutorial but did not see anything on processing currency input, just on output formatting based on the locale (which works fine for us). Thanks...

    When I run the following program:
    import java.text.NumberFormat;
    import java.text.ParseException;
    import java.util.Locale;
    public class frmoney
        public static void main(String[] args)
         String number = (args.length < 1) ? "24,98" : args[0];
         NumberFormat nfc = NumberFormat.getCurrencyInstance(Locale.FRENCH);
         try {
             System.out.println("Parsing " + number);
             System.out.println(nfc.parse(number));
         catch (ParseException e)
             System.out.println(e);
    }I get:
    Parsing 24,98
    java.text.ParseException: Unparseable number: "24,98"

  • Parsing signed percentages with DecimalFormat

    Hi !
    I am trying to parse strings such as "+0.35%" and "-0.46%" with a DecimalFormat.
    I tried to use String patterns such as "+#.#%;-#.#%", or "#.#;#.#" with additional invocations to :
    myParser.setPositivePrefix("+");
    myParser.setPositiveSuffix("%");
    myParser.setNegativePrefix("-");
    myParser.setNegativeSuffix("%");
    Whichever may be the solution, I got:
    java.text.ParseException: Unparseable number: "+2.65%"
         at java.text.NumberFormat.parse(NumberFormat.java:279)
    When looking within DecimalFormat, I found out that, when looking for the suffix, the parser seems unable to decide wether the number is positive or negative ....
    I can't change the String to parse (they come from a client tier), nor extend the DecimalFormat class (it is wrapped in a legacy tool I can't change) - the only thing possible is to parameterize the formatter or to call it's base methods .....
    And I never found any sample on any forum here (or elsewhere) of formating signed percentages.
    Is there any mean to achieve the thing? And please, what are the obvious things I missed ?
    Thanks in advance.

    What is wrong with "+#.#%;-#.#%" ?
    This works fine:String str = "-2.65%";
    DecimalFormat fmt = new DecimalFormat("+#.#%;-#.#%");
    fmt.getDecimalFormatSymbols().setDecimalSeparator('.');
    System.out.println(fmt.parse(str));(In my locale the decimal separator is ',' and not '.' so I have to change it; that part doesn't necessarily apply to you)

  • ADF UIX: How to use MessageCheckbox to trigger a component to be rendered?

    I have two UIX component:
    messageCheckBox model="${bindings.Servicelocal}"
    and messageStyledText id="mst_TextChange".
    I want messageStyledText to be showed if messageCheckBox was checked.
    I want to know how to set the “rendered” property of the MessageStyleText.
    The following is my uix xml code:
    <rowLayout>
    <contents>
    <cellFormat>
    <contents>
    <messageStyledText id="mst_TextChange" text="${bindings.Servicelocal}" rendered="${bindings.Servicelocal}"/>
    </contents>
    </cellFormat>
    <cellFormat>
    <contents>
    <messageCheckBox model="${bindings.Servicelocal}" >
    <end>
    <formValue model="${ctrl:createCheckBoxState(bindings.Servicelocal)}"/>
    </end>
    <primaryClientAction>
    <firePartialAction event="ShowHide_Text" unvalidated="true" targets="mst_TextChange"/>
    </primaryClientAction>
    </messageCheckBox>
    </contents>
    </cellFormat>
    </contents>
    </rowLayout>

    I think you're on the right track here.
    Assuming that the values for Servicelocal are 'Y' and null, what you could do is use EL to define the rendered component as follows:
    rendered="${!empty bindings.Servicelocal.inputValue}"
    or alternatively:
    rendered="${empty bindings.Servicelocal.inputValue ? false : true}"
    I'm writing this from home so can't check the above but you get the idea.
    Note the use of ".inputValue" to retrieve the actual value of Servicelocal.
    I note your use of the &lt;firePartialAction&gt; tag in the &lt;messageCheckBox&gt;. Please note I recently found a bug (I've raised this with Oracle Support) where the &lt;firePartialAction&gt; causes the running page to ignore any user input for some seconds (5 sec?) when fired from a &lt;messageCheckBox&gt;. Your mileage may vary.
    Hope this helps.
    CM.

  • Uix number formatting

    Hi There,
    Is there a way in uix table to format data that is retrieved using data control.
    I am displaying a collection in a table. I want to format the value of one of the fields in table. I use data control to populate this table.
    Any help/suggestion would be greatly appreciated.
    Thanks,
    Amish

    Hi Guru,
    Place the field on your report and right click on field and go in Format field select Number TabClick on Customize Button In Decimals : select 1.000 and Roiunding: select 0.001
    Hope this will help you
    Thanks,
    Sastry

  • UIX/BC4J puzzle to render and unknown number of data tables.

    Hello, I have the next puzzle I haven't solved:
    The requirements for a page are that it has to render Contract numbers as table titles and Bills dued to each contract as table content, something like this:
    Contract No. 4353
    Bill No. Date Amount
    8799 25/04/2006 $800.00
    3690 25/04/2006 $1,000.00
    and then more tables like that as contract rows are found in a view object.
    I have two linked view objects: the contractView and the billsView.
    Besides, the contractView has attributes which should be rendered as the bills table footer (amount total for example).
    I found a way to iterate over the contractView and then the billsView, with something like this:
    <tableLayout>
        <contents childData="${bindings.contractViewIterator.allRowsInRange}">
             <rowLayout>
                  <contents>
                    <header text="${uix.current.contractNumber}"/>
                    <table tableData="${uix.current.attributeValues[15].allRowsInRange}"/>
                    <!-- the 15th attribute is the link accessor, so I'm getting the billsView here -->
                         <!-- and here would go more code to render the table contents -->
                    </table>
                  </contents>
              </rowLayout>
           </contents>
    </tableLayout>This works fine for tables with no footer data, but I need to display the footer section of the table, the problem is that the footer section data is in the parent view (contracts) and I cannot reference it inside the <table> because there the "uix.current" object represents a row in the billView.
    If someone has another idea of achieving this, I'd really appreciate it if you post it here, or a way to reference the parent uix.current object.
    Thank you.

    The only solution I came up with was to use the link accessor in the opposite direction, so I can get the contractView and display the totals on each column.
    So, the next code does it:
    <footer>
         <formattedText text="${uix.current.contracts.totalAmount}"/>
    </footer>Where contracts is the backwards accessor to the parent view object and totalAmount the attribute name to display in the column footer. I had to generate the row implementation for both view objects to access attributes by name to make it easier.
    I post the solution in case someone runs into the same problem.
    Thank you.

  • UIX Checkbox

    The How-to document "Creating an ADF Databound Check Box in JSP" describes the process for the common case of mapping a character based flag in an Oracle database to a JSP Check Box control. It appears straightforward.
    However, when I try a similar approach when using UIX, it does not appear to work. I have the following issues...
    1. I can only ever get the negative case to work. Even if I set the attribute to "Y" or "N" in the action class, only when the checkbox is not checked does it work. I would imagine that the value is being overriden at a later time in the case where the checkbox is checked.
    2. The checkbox will not populate from the data. I have populated the selectedValue in the tag. Is there something else I need?
    Any help would be greatly appreciated. I have tried a number of approaches but can not seem to solve this simple problem. I have tried creating custom domains and data controls but have not had any success.
    Thanks,
    Brian

    Brian,
    another way to do it is to set the messageBox in your page - define value=... for the value it should take when it's checked;
    here an example for a bound attribute "IsValid":
    <messageCheckBox model="${bindings.IsValid}" value="Y"/>and then see if the checkbox was actually included in the request parameters (parameter name will be VB_Isvalid in my example) or not. If it is not included then we have to explicitly set the unchecked case into the ADF Form Bean for the normal update process to handle:
      protected void processUpdateModel(DataActionContext ctx)
        // First look for the request parameter VB_Isvalid
        Object cbInRequest = ctx.getHttpServletRequest().getParameter("VB_IsValid");
        Object event       = ctx.getHttpServletRequest().getParameter("event");
        // We only need to do anything if the checkbox was not submitted during an event
        if (cbInRequest == null && event != null)
          // Get hold of the checkBoxBinding
          DCBindingContainer bc = ctx.getBindingContainer();
          JUCtrlValueBinding checkBoxBinding = (JUCtrlValueBinding) bc.findCtrlBinding("IsValid");
          // Reset it explicitly to the *unchecked* value (N in this case)
          checkBoxBinding.setAttribute("IsValid","N");
        //Now let the model update progress using the data in updateForm as normal
        super.processUpdateModel(ctx);
    If you have access to MetaLink, I wrote Note 316851.1 for UIX based on Duncan Mills's document: "Creating an ADF Databound Check Box in JSP" (http://www.oracle.com/technology/products/jdev/tips/mills/adf_data_bound_checkbox.html)
    You can download an example application from MetaLink.
    It could be there is an easier solution though:
    "the simple solution for the “checkbox” problem is to overwrite the reset() method in a subclass and use the subclass instead of the default DynaActionForm."
    as explained in the following blog:
    http://www.it-eye.nl/weblog/2005/10/14/correctly-use-of-checkboxes-with-struts-dynaactionform/
    However, I had no time to test it yet.
    If you do, please update this thread with your feedback.
    Regards,
    Didier.

  • Limitation on number of presentations in iuXML page?

    Is there a limitation on the number of presentations that can be put into a iuXML page?
    When I click on the paging control for one of the crosstabs on the following page, I get an error in the browser stating "Error on page - Invalid Syntax" then it shows the URL of this page which is normal looking and fairly short.
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:bibeans="http://xmlns.oracle.com/bibeans">
    <bibeans:biThinSession id="bisession1" biConfiguration="/LiftBIConfig1.xml">
    <!-- Add BI Definition Elements here -->
    <bibeans:presentationDef id="presFG" location="Forecast Grid Abs"/>
    <bibeans:presentationDef id="presFGLC" location="Forecast Grid Line Chart Abs"/>
    <bibeans:presentationDef id="ChannelThumb" location="Volume Gap Folder/Volume Gap by Channel Chart Abs"/>
    <bibeans:presentationDef id="RegionThumb" location="Volume Gap Folder/Volume Gap by Region Chart Abs"/>
    <bibeans:presentationDef id="CustThumb" location="Volume Gap Folder/Volume Gap by Customer Chart Abs"/>
    <!-- <bibeans:presentationDef id="BrandThumb" location="Volume Gap Folder/Volume Gap by Brand Chart Abs"/>
    <bibeans:presentationDef id="PackThumb" location="Volume Gap Folder/Volume Gap by Pack Chart Abs"/>
    --> </bibeans:biThinSession>
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider/>
    <contents>
    <document>
    <metaContainer>
    <head title="Reports"/>
    </metaContainer>
    <contents>
    <form name="form1">
    <!-- Form Contents Start Here -->
    <contents>
    <pageLayout>
    <contents>
    <bibeans:presentation data:biPresentation="ChannelThumb@bibeans:bisession1">
    </bibeans:presentation>
    <bibeans:presentation data:biPresentation="RegionThumb@bibeans:bisession1">
    </bibeans:presentation>
    <bibeans:presentation data:biPresentation="CustThumb@bibeans:bisession1">
    </bibeans:presentation>
    <bibeans:presentation data:biPresentation="BrandThumb@bibeans:bisession1">
    </bibeans:presentation>
    <bibeans:presentation data:biPresentation="PackThumb@bibeans:bisession1">
    </bibeans:presentation>
    <bibeans:presentation data:biPresentation="presFG@bibeans:bisession1">
    </bibeans:presentation>
    <bibeans:presentation data:biPresentation="presFGLC@bibeans:bisession1">
    </bibeans:presentation>
    </contents>
    <tabs>
    <tabBar selectedIndex="1">
    <contents>
    <link text="Filter" ctrl:destination="Filter"/>
    <link text="Report" disabled="true"/>
    </contents>
    </tabBar>
    </tabs>
    </pageLayout>
    </contents>
    <!-- Form Contents End Here -->
    </form>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <!-- Event Handlers-->
    <handlers>
    </handlers>
    </page>
    You can see that the last two presentationDefs are commented out. If I comment out one more presentation, I do not get the error. It doesn't seem to matter which ones I pull but if there are too many presentations, I get the error.
    Any insights would be appreciated. Thank you.
    - Charley

    Hi Jim,
    The results from the load test look quite normal, the system fairly quickly stabilizes at a particular performance level and remains there for the duration of the test. In terms of latency results, we see that the cache.putAll operations are taking ~45ms per bulk operation where each operation is putting 100 1K items, for cache.getAll operations we see about ~15ms per bulk operation. Additionally note that the test runs over 256,000 items, so it is well beyond the 16,000 limit you've encountered.
    So it looks like your application are exhibiting different behavior then this test. You may wish to try to configure this test to behave as similarly to yours as possible. For instance you can set the size of the cache to just over/under 16,000 using the -entries parameter, set the size of the entries to 900 bytes using the -size parameter, and set the total number of threads per worker using the -threads parameter.
    What is quite interesting is that at 256,000 1K objects the latency measured with this test is apparently less then half the latency you are seeing with a much smaller cache size. This would seem to point at the issue being related to or rooted in your test. Would you be able to provide a more detailed description of how you are using the cache, and the types of operations you are performing.
    thanks,
    mark

  • [UIX] How To: Return multiple values from a LOV

    Hi gang
    I've been receiving a number of queries via email on how to return multiple items from a LOV using UIX thanks to earlier posts of mine on OTN. I'm unfortunately aware my previous posts on this are not that clear thanks to the nature of the forums Q&A type approach. So I thought I'd write one clear post, and then direct any queries to it from now on to save me time.
    Following is my solution to this problem. Please note it's just one method of many in skinning a cat. It's my understanding via chatting to Oracle employees that LOVs are to be changed in a future release of JDeveloper to be more like Oracle Forms LOVs, so my skinning skills may be rather bloody & crude very soon (already?).
    I'll base my example on the hr schema supplied with the standard RDBMS install.
    Say we have an UIX input-form screen to modify an employees record. The employees record has a department_id field and a fk to the departments table. Our requirement is to build a LOV for the department_id field such that we can link the employees record to any department_id in the database. In turn we want the department_name shown on the employees input form, so this must be returned via the LOV too.
    To meet this requirement follow these steps:
    1) In your ADF BC model project, create 2 EOs for employees and departments.
    2) Also in your model, create 2 VOs for the same EOs.
    3) Open your employees VO and create a new attribute DepartmentName. Check “selected in query”. In expressions type “(SELECT dept.department_name FROM departments dept WHERE dept.department_id = employees.department_id)”. Check Updateable “always”.
    4) Create a new empty UIX page in your ViewController project called editEmployees.uix.
    5) From the data control palette, drag and drop EmployeesView1 as an input-form. Notice that the new field DepartmentName is also included in the input-form.
    6) As the DepartmentName will be populated either from querying existing employees records, or via the LOV, disable the field as the user should not have the ability to edit it.
    7) Select the DepartmentId field and delete it. In the UI Model window delete the DepartmentId binding.
    8) From the data controls palette, drag and drop the DepartmentId field as a messageLovInput onto your page. Note in your application navigator a new UIX page lovWindow0.uix (or similar) has been created for you.
    9) While the lovWindow0.uix is still in italics (before you save it), rename the file to departmentsLov.uix.
    10) Back in your editEmployees.uix page, your messageLovInput source will look like the following:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="${bindings.DepartmentId.path}"
        destination="lovWindow0.uix"/>Change it to be:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="DepartmentId"
        destination="departmentsLov.uix"
        partialRenderMode="multiple"
        partialTargets="_uixState DepartmentName"/>11) Also change your DepartmentName source to look like the following:
    <messageTextInput
        id=”DepartmentName”
        model="${bindings.DepartmentName}"
        columns="10"
        disabled="true"/>12) Open your departmentsLov.uix page.
    13) In the data control palette, drag and drop the DepartmentId field of the DepartmentView1 as a LovTable into the Results area on your page.
    14) Notice in the UI Model window that the 3 binding controls have been created for you, an iterator, a range and a binding for DepartmentId.
    15) Right click on the DepartmentsLovUIModel node in the UI Model window, then create binding, display, and finally attribute. The attribute binding editor will pop up. In the select-an-iterator drop down select the DepartmentsView1Iterator. Now select DepartmentName in the attribute list and then the ok button.
    16) Note in the UI Model you now have a new binding called DCDefaultControl. Select this, and in the property palette change the Id to DepartmentName.
    17) View the LOV page’s source, and change the lovUpdate event as follows:
    <event name="lovSelect">
        <compound>
            <set value="${bindings.DepartmentId.inputValue}" target="${sessionScope}" property="MyAppDepartmentId" />
            <set value="${bindings.DepartmentName.inputValue}" target="${sessionScope}" property="MyAppDepartmentName" />
        </compound>
    </event>18) Return to editEmployees.uix source, and modify the lovUpdate event to look as follows:
    <event name="lovUpdate">
        <compound>
            <set value="${sessionScope.MyAppDepartmentId}" target="${bindings.DepartmentId}" property="inputValue"/>
            <set value="${sessionScope.MyAppDepartmentName}" target="${bindings.DepartmentName}" property="inputValue"/>     
        </compound>
    </event>That’s it. Now when you select a value in your LOV, it will return 2 (multiple!) values.
    A couple things to note:
    1) In the messageLovInput id field we don’t use the “.path” notation. This is mechanism for returning 1 value from the LOV and is useless for us.
    2) Again in the messageLovInput we supply “_uixState” as an entry in the partialTargets.
    3) We are relying on partial-page-refresh functionality to update multiple items on the screen.
    I’m not going to take the time out to explain these 3 points, but it’s worthwhile you learning more about them, especially the last 2, as a separate exercise.
    One other useful thing to do is, in your messageLovInput, include as a last entry in the partialTargets list “MessageBox”. In turn locate the messageBox control on your page (if any), and supply an id=”MessageBox”. This will allow the LOV to place any errors raised in the MessageBox and show them to the user.
    I hope this works for you :)
    Cheers,
    CM.

    Thanks Chris,
    It took me some time to find the information I needed, how to use return multiple values from a LOV popup window, then I found your post and all problems were solved. Its working perfectly, well, almost perfectly.
    Im always fighting with ADF-UIX, it never does the thing that I expect it to do, I guess its because I have a hard time letting go of the total control you have as a developer and let the framework take care of a few things.
    Anyway, I'm using your example to fill 5 fields at once, one of the fields being a messageChoice (a list with countries) with a LOV to a lookup table (id , country).
    I return the countryId from the popup LOV window, that works great, but it doesn't set the correct value in my messageChoice . I think its because its using the CountryId for the listbox index.
    So how can I select the correct value inside my messageChoice? Come to think of it, I dont realy think its LOV related...
    Can someone help me out out here?
    Kind regards
    Ido

  • Query adf uix

    Hello I've 2 pages uix (xml format). In the first page (source.uix) I've a combobox and I can select a number that represents an record identifying . In the same page there's a submit buttom with destination to other page (record.uix). I'd like in the record.uix show the record (with all their fields) represents by the identifying received in the request. How to do an query in the record.uix?
    thank you very much!!

    http://www.oracle.com/technology/products/jdev/tips/shmeltzer/setwhereclause/uix.html

  • How to handle multiple database tables in a single UIX page?

    Hi,
    I am new to UIX & BC4J. I have to handle data from four different tables in the database. The scenario is as follows:
    The tables are
    1. user
    fields are: userid number, name varchar2
    2. business
    fields are: businessId number, name varchar2
    3. service
    fields are: serviceId number, serviceName varchar2
    4. userBusiness
    userid,businessid (both are foreign keys) & form complex primary keys.
    and userid,businessid, serviceId are primary keys.
    Now my problem is: to create a webpage where
    1. The userid is available in the httpSession Variable as string.
    2. according to the userId stored in the session variable I have to retrieve the business names and show them in a choice i.e., pull down box.
    3. I have to show the services provided by the business for the business name selected in the combo box.
    Could anyone Please help me solve this problem? Could you please give me hints? I have truncated the other fields in the tables.
    Thanking you,
    Velpandian .S

    At the moment, you can't do it declaratively. You have to do it in an event handler. Assuming you have the userid setup as a query parameter in the view object, something like this should get you started:
    public EventResult handleEvent(
    BajaContext context, Page page, PageEvent event) throws Throwable
    HttpSession session = context.getServletRequest().getSession(true);
    ViewObject view = ServletBindingUtils.getViewObject(context);
    String userid = session.getAttribute("userid");
    view.setWhereClauseParam(0, userid);
    view.executeQuery();

  • How to cast a parameter from ${bindings.myParam} which is Number to String

    I have a button which sets a param in request so I do sth like this in event on uix page:
    <set property="param_id" target="${requestScope}" value="${bindings.myParam.attributeValue} "/>
    but that myParam is Number (not String). And I have java.lang cast exception.
    What should I do to cast it?

    I'm sure there is a simpler way but i guess this works:
    <bean:define id="num" name="bindings" property="myParam.attributeValue" type="Number"/>
    <set property="param_id" target="${requestScope}" value="<%num.tostring()%>"/>This is not tested! One other thing to check is JSTL FMT formatNumber but i don't remember the syntax.

Maybe you are looking for

  • Hi all - is it really possible to use one license for two computers or is it just a rumor?

    I heard that it would be possible that you can use one license for two computers. Is that the truth? And if so - how does it work? Thanks K

  • How do I change the resolution of my photos on my iBookG4?

    I have iPhoto 6 and post things regularly on craigslist. With my older camera I never had any problems uploading photos to the web. Now, with my new 6 megapixel camera, CL won't always take the photos all at once. Is there a way to downsize the pixel

  • Another calibration question

    hey all, when calibrating my MacBook battery, once the battery is fully charged and i've let it set for at least two hours with the adapter plugged in, i unplug it and let the battery start to drain. Question: At this point in the process, does it di

  • Java image in html

    i hav created a jpg file using java... i need to use that file to display it in a table cell in html... how can i do that...

  • HELP!!! wwctx_api.get_user

    I created a PL/SQL Server Page just to show the login information from a login portlet. The code follows: <%@ page language="PL/SQL" %> <%@ plsql procedure="logininfo" %> <HTML> <HEAD><TITLE>This is a PSP Page!</TITLE></HEAD> <BODY> <% declare myname