Passing long values from inputItem to function  in backing bean

hi,
in my backing bean i intend to call function func1(Long pAmount)
on my page there is an inputItem bound in the BB.
So, in me backing bean i'd like to achieve long value (oracle db number(10,2)) from the bound text item.
How can i get long value ? by default it's coming easy as Number ( (Number)(itPTPAmount.getValue()).toString())
but even though i can't convert it to Long;
what i have is going thru String, but this way below cuts fractions:
try{
ptpAmount=new Long((itPTPAmount.getValue()).toString());
catch(Exception e){System.out.println("error ptpAmount:"+e.getMessage());return;}
please advise

you can use doubleValue()
http://docs.oracle.com/cd/E12839_01/apirefs.1111/e10655/oracle/jbo/domain/Number.html#doubleValue%28%29

Similar Messages

  • How to pass a value from jspx page to the managed bean

    hi,
    i have created a jspx page and manages bean with page flow scope..
    in my jspx page i am searching a employee record from the data base . and getting entire employee details including 'status' as a search result.
    here i want to pass the value of 'status ' field to the managed bean variable called 'stval'.
    can anybody suggest any solution?.......

    As per the details provided in the post above, when the user clicks on the search in the af:query, the results are populated in the table. And you are interested in getting the value of particular column. This could be done by having the custom row selection listener to get the value of the current row (selected row in the table).
    1) Have a custom selection listener:
    <af:table value="#{bindings.EmpDeptVO.collectionModel}" var="row"
    rows="#{bindings.EmpDeptVO.rangeSize}"
    emptyText="#{bindings.EmpDeptVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.EmpDeptVO.rangeSize}"
    rowBandingInterval="0"
    rowSelection="single" id="t1"
    partialTriggers=":::qryId1 ::ctb1 ::commandToolbarButton1"
    columnStretching="column:c1"
    styleClass="AFStretchWidth" columnSelection="multiple"
    first="0" contentDelivery="immediate" autoHeightRows="10"
    binding="#{pageFlowScope.ExampleBean.searchResultsTable}"
    *selectionListener="#{pageFlowScope.ExampleBean.rowSelected}">*
    2) In the method, set the current row programmatically:
    ADFUtil.invokeEL("#{bindings.EmpDeptVO.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    3) Get the current row and get the required attribute values and set it in any of the variables in the managed bean:
    Row selectedRow =
    (Row)ADFUtil.evaluateEL("#{bindings.EmpDeptVOIterator.currentRow}");
    String status = selectedRow.getAttribute("Status");
    Thanks,
    Navaneeth

  • Reading Values from a Datatable to a backing bean

    I have a Datatable which has 3 columns.
    First Column is a Account Number and the Second Column gives the address of the Account Number.
    The Inputs 1 to 5 Account Number on the Previous Page. Depending on number of Accounts Input by the user - the datatable shows those many rows with address. Now the third column has 4 Input Text fields for New Address.
    Because the 3rd column is also generated dynamically how can I use the New Address entered by the user in my backing bean.
    The JSF Code is:
    <h:form id="frmManualDataEntryUpdateAddress">
        <tr:panelHeader styleClass="titleText" text="Update Address"/>
        <h:dataTable rows="25" rowClasses="oddRow,evenRow"
                     styleClass="columnSpace font_size" value="#{summaryList}"
                     var="summary">
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Keyline"/>
                </f:facet>
                <h:outputText rendered="#{summary.keyline != null}"
                              value="#{summary.keyline}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Address"/>
                </f:facet>
                <h:outputText rendered="#{summary.lienHolderName != null}"
                              value="#{summary.lienHolderName}"/>
                <h:outputText rendered="#{summary.lienHolderAddressLine1 != null}"
                              value="#{summary.lienHolderAddressLine1}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderAddressLine2 != null}"
                              value="#{summary.lienHolderAddressLine2}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderCity != null}"
                              value="#{summary.lienHolderCity}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderState != null}"
                              value=" #{summary.lienHolderState}"/>
                <h:outputText rendered="#{summary.lienHolderZip4 != null}"
                              value=" #{summary.lienHolderZip4}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="New Address"/>
                </f:facet>
                <tr:panelFormLayout>
                    <tr:panelLabelAndMessage label="Address Line 1"
                                             for="addressLine1">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="addressLine1" maximumLength="60"
                                          value="#{summary.acsEntry.acsAddressLine1}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="City" for="city">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="city" maximumLength="28"
                                          value="#{summary.acsEntry.acsCity}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="State" for="state">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="state" maximumLength="2"
                                          value="#{summary.acsEntry.acsState}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="Zip" for="zip">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="zip" maximumLength="60"
                                          value="#{summary.acsEntry.acsZip4}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                </tr:panelFormLayout>
            </h:column>
        </h:dataTable>
    </h:form>

    I have a Datatable which has 3 columns.
    First Column is a Account Number and the Second Column gives the address of the Account Number.
    The Inputs 1 to 5 Account Number on the Previous Page. Depending on number of Accounts Input by the user - the datatable shows those many rows with address. Now the third column has 4 Input Text fields for New Address.
    Because the 3rd column is also generated dynamically how can I use the New Address entered by the user in my backing bean.
    The JSF Code is:
    <h:form id="frmManualDataEntryUpdateAddress">
        <tr:panelHeader styleClass="titleText" text="Update Address"/>
        <h:dataTable rows="25" rowClasses="oddRow,evenRow"
                     styleClass="columnSpace font_size" value="#{summaryList}"
                     var="summary">
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Keyline"/>
                </f:facet>
                <h:outputText rendered="#{summary.keyline != null}"
                              value="#{summary.keyline}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Address"/>
                </f:facet>
                <h:outputText rendered="#{summary.lienHolderName != null}"
                              value="#{summary.lienHolderName}"/>
                <h:outputText rendered="#{summary.lienHolderAddressLine1 != null}"
                              value="#{summary.lienHolderAddressLine1}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderAddressLine2 != null}"
                              value="#{summary.lienHolderAddressLine2}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderCity != null}"
                              value="#{summary.lienHolderCity}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderState != null}"
                              value=" #{summary.lienHolderState}"/>
                <h:outputText rendered="#{summary.lienHolderZip4 != null}"
                              value=" #{summary.lienHolderZip4}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="New Address"/>
                </f:facet>
                <tr:panelFormLayout>
                    <tr:panelLabelAndMessage label="Address Line 1"
                                             for="addressLine1">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="addressLine1" maximumLength="60"
                                          value="#{summary.acsEntry.acsAddressLine1}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="City" for="city">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="city" maximumLength="28"
                                          value="#{summary.acsEntry.acsCity}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="State" for="state">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="state" maximumLength="2"
                                          value="#{summary.acsEntry.acsState}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="Zip" for="zip">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="zip" maximumLength="60"
                                          value="#{summary.acsEntry.acsZip4}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                </tr:panelFormLayout>
            </h:column>
        </h:dataTable>
    </h:form>

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • Pass a value from a PL/SQL function to a javascript (html header) ? ?

    Hey Guys,
    Have a question regarding how to pass a value from a PL/SQL function to a javascript in the HTML Header.
    I have created a PL/SQL function in my database, which does looping.
    The reason for this is:  On my apex page when the user selects a code, it should display(or highlight buttons) the different project id's present for that particular code.
    example= code 1
    has project id's = 5, 6, 7
    code 2
    has project id's = 7,8
    Thank you for your Help or Suggestions
    Jesh
    The PL/SQL function :
    CREATE OR REPLACE FUNCTION contact_details(ACT_CODE1 IN NUMBER) RETURN VARCHAR2 IS
    Project_codes varchar2(10);
    CURSOR contact_cur IS
    SELECT ACT_CODE,PROJECT_ID
    FROM ACTASQ.ASQ_CONTACT where ACT_CODE = ACT_CODE1;
    currec contact_cur%rowtype;
    NAME: contact_details
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 6/25/2009 1. Created this function.
    BEGIN
    FOR currec in contact_cur LOOP
         dbms_output.put_line(currec.PROJECT_ID || '|');
         Project_codes := currec.PROJECT_ID|| '|' ||Project_codes;
    END LOOP;
    RETURN Project_codes;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END contact_details;
    /

    Jesh:
    I have made the following modifications to your app to get it to work as I thing you need it to.
    1) Changed the source for the HTML Buttons Region(note use of id vs name for the Buttons)
    <script>
    function hilitebtn(val) {
    //gray buttons
    $x('graduate').style.backgroundColor='gray'
    $x('distance').style.backgroundColor='gray'
    $x('career').style.backgroundColor='gray'
    $x('photo').style.backgroundColor='gray'
    //AJAX call to get project-ids
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=GETPROJECTS',0);
    get.addParam('x01',val)
    gReturn = get.get();
    var arr=gReturn.split(':');  //dump into array
    get = null;
    for (i=0;i<arr.length;i++) {
    // alert('val=' + arr);
    if ( arr[i]==5)
    $x('graduate').style.backgroundColor='red';
    if ( arr[i]==6)
    $x('distance').style.backgroundColor='red';
    if ( arr[i]==7)
    $x('career').style.backgroundColor='red';
    if ( arr[i]==8)
    $x('photo').style.backgroundColor='red';
    </script>
    <table cellpadding='0' cellspacing='0' border='0'>
    <tr><td>
    <input type='button' id='graduate' value='Graduate'>
    </td>
    <td>
    <input type='button' id='distance' value='Distance'>
    </td>
    <td>
    <input type='button' id='career' value='Career/Tech'>
    </td>
    <td>
    <input type='button' id='photo' value='Photos'>
    </td>
    </tr></table>
    2) Defined the application process  GETPROJECTS as DECLARE
    IDS varchar2(1000);
    l_act_code varchar2(100) :=4;
    begin
    IDS:='';
    l_act_code := wwv_flow.g_x01;
    for x in(
    SELECT ACT_CODE,PROJECT_ID
    FROM ASQ_CONTACT
    where ACT_CODE = l_act_code)
    LOOP
    IDS := IDS || X.PROJECT_ID|| ':' ;
    END LOOP;
    HTP.PRN(IDS);
    END;
    3) Changed the 'onchange' event-handler on p1_act_code to be 'onchange=hilitebtn(this.value)'
    4) Added the JS to the HTML Page Footer <script>
    hilitebtn($v('P1_ACT_CODE'));
    </SCRIPT>

  • How to pass the value from Sub report to main report

    I have un report(mainreport) within a subreport(subreport).
    With reporting services, how to pass the value from Sub report to main report?
    thanks

    Hi Alebet,
    With reporting services to pass values from sub report in to main report is not supported directly.
    But there are some workarounds through which you can get this .
    There are two ways to get this.
    1- Put your sub report query into some table. i mean to say through the subreport query get some temporary table.
    2- Using this temporary tables data write some Scala function in the data base.
    3- Now in your main report query return this scala function as a column.
    4- Extract the column value where ever you want in your main report which is getting calculated from the subreport query. so you will be getting the values returned from the subreport in the main report.
    This will definitely work fine as i have done some report in this way.
    Another way of doing is that
    1- prepare another data set with the same query as in sub report in the data tab.
    2- then refer this 2nd dataset in your main report .
    But better way will be the top one.
    Anyway please let me know if you get the solution.
    Thanks
    Mahasweta

  • How to pass all values from one node element to created node element?

    Hi
    I have model node element under which there are 7 values, and I've created value node element and trying to pass the values from the model node Element to this value node element. But instead of passing all the values its listing only one value.
    How do we rectify this problem!!!
    Thanks in Advance
    Srikant

    Hi Anil
    I've created the node named: TableNode
    and the name of the node from which i want to get the data is : Li_Required_Node
    the Node Structure is
    Context
      |_ Zs_Quantity_Input
         |_Output
           |_Node_Required_Node
              |_Schddt
      |_TableNode
        |_CmpDate
    The Schddt has some 7 values
    The code Snippet is as follows:
    IPublicPricesComp.ITableNodeElement nodeElement;
    IPublicPricesComp.ILi_Required_NodeElement scheduleElement;
    int counter3Max = wdContext.ILi_Required_Node().size();
    for( int counter3= 0 ; counter3 < counter3Max ;counter3++ )
    nodeElement = wdContext.createTableNodeElement();
                             scheduleElement = wdContext.nodeZs_Quantity_Input().nodeOutput_Contract_Qty().nodeLi_Required_Node().getLi_Required_NodeElementAt(counter3);
    nodeElement.setCmpDate(scheduleElement.getSchddt());
    wdContext.nodeTableNode().addElement(nodeElement);               
    On writing the above code and then binding the node to a table column only one value getting displayed
    Where can be the error?
    Thanks in Advance
    Srikant

  • Passing the values from one pgm to another pgm (Calling pgm has no sel scr)

    Hi gurus,
    In my requirement i need to pass the values from one program to another program.
    I am using SUBMIT statement . But , the program which i am calling has no selection screen.
    So how can i pass the values?
    Please help me ASAP.
    Regards,
    Bhanu.R

    Export your internal tables or work areas to a memory id in ur program before u use submit.
    Then in second pgm you have to import from memory id given above.
    example.
    EXPORT gs_header FROM gs_header to memory id 'HEADER'.
    EXPORT gt_item FROM gt_item to memory id 'ITEM'.
    SUBMIT YFIIN_DISHC_MAILREPORT EXPORTING LIST TO MEMORY AND RETURN.
    In your second pgm you can write
    import gs_header TO gs_header from MEMORY id 'HEADER'.
    import gt_item TO gt_item from MEMORY id 'ITEM'.

  • Passing the values from subreport to master report in JasperReports

    Hi All,
    I want to pass the values from subreport to master report, but my subreport is without any query.
    Please help me in this regard. its urgent.
    Thanks & Regards
    Kris

    Hi,
    Below link may help you
    http://jasperreports.sourceforge.net/tips.tricks.html#returnvalues
    regards
    MJ

  • Passing filter values from column formula in OBIEE 10g

    Hi,
    I am trying to pass filter value from the column LY Spend YTD columns where we have a filter option and passing the year filter 2013 as below.
    FILTER("Fact - Purchasing - Invoice"."LY Spend YTD" USING (Time."Year" = '2013'))
    My goal behind doing this is, we have a filter already present for the whole criteria on the year which is 2012.
    But specifically for this column i dont want to pass the year 2012 to it, Instead I want to pass 2013 to it. But I am not succeding the result is blank.
    Please suggest and let me know if further understanding is needed.

    Hi Srini
    Thanks for you reply.
    I cannot do that way because some measures are satisfying with year 2012 and displaying the data and other measure are satisfying with 2013.
    I am working on LY Spend YTD, LY spend YTD - 1, Spend YTD and Year ago spend.
    So thats the reason I have thought that way of passing the filter in column formula irrespective of criteria filter.
    Please suggest.

  • How to pass the values from the Wb Dynpro Application to the SAP Backend ?

    Hi All,
    Good morning..,
    I have scenario like:
    I want to pass the values from the web dynpro appication to the SAP Back end R/3 Table. IN backend the RFC is writtn to accept the structure input from the Webdynpro.
    Upto know I imported the corresponding RFC and maaped to the View.
    How to proceed with the coding to save the data...
    PLease suggest...
    Regards and Thanks in Advance,
    CSP

    Hi  Pradeep
    Steps:
    1. First create an instance for bapi and bind the instance to the bapi node.
      Z<bapi name> zb=new Z<bapi name>();
      wdContext.nodeZ<bapi name>. bind(zb);
    2. Then if u have the import parameter u have to set them by using
        The instance of the above bapi.
        Zb.set<import parameters>;
    3. If the bapi has a table parameters then the structure for the table parameters will also be imported
       In the model class.
    4. Set the table parameters by creating the instance for that structure and using this instance set it.
       Z<Struct>itm tab=new Z<Struct>();
       Tab.set<table parameters>
    5. Then add the structure instance to the bapi instance.
        Zb.add(Tab);
    6. Then Execute the bapi after setting the import parameters.
    7.  If there is any export parameters, then get the values after execution.
    Look at this thread for codes
    Re: RFC call on click of button
    Regards,
    Arun

  • Is it possible to pass  a value from the list to another page..

    Hi everyone,
    I created a (list region) on a page and there is a FORM on the same page.I am trying to pass a value from that page to another page when the user selects one of the list entries.I tried with SET THESE ITEM.. WITH THESE VALUES in the list entries like
    SET THESE ITEMS--P13_TESTING_ID
    WITH THESE VALUES --&P10_ID.
    but its not working for me.I want to pass that value only when the user hits that list entry.Is it possible to do.
    Thanku
    phani

    Assuming P10_ID is an item on the FORM, I think , the form would have to be posted (submitted) for the item's vaue to be available in session state.

  • Passing a value from internal table to a powerpoint slide

    Hi,
    Does anyone know how to pass a value from internal table to a powerpoint slide?  I would also need some codes with regards to the coding to open the powerpoint and insert the value in.
    Thanks.
    Points will be awarded.
    Hope to hear from you soon.
    Lawrence

    geez!! do feel sorry for you
    you can fire FM WS_EXECUTE to open power point but passing a variable at run-time i'm not sure, sorry.

  • How to pass the value from JSP or HTML  to Applet

    Plz reply ....How can we pass the value from the JSP Page or from HTML page to Applet embedded in same page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

  • How To Pass the value from JSP to Applet

    plz reply how can we pass the value from the JSP to Applet ...the applet is embedded in JSP page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

Maybe you are looking for