Assigning return value of a javascript function to a variable

hi.
I have a javascript function which returns string.
I wanna assing return value of that function to variable.
for example:
<script>
funtion writeMe()
var ex;
ex="try"
return ex;
</script>
Then in body of JSP page. I wanna do something like:
<% String st;%>
Now I wanna assign the value that returned from writeMe function ("try") to st string.like:
<%st= writeMe();%>. but of course it doesn't work. how can I do that?

thnx. but actually what I want to do is sending some values produced by javascript to a barchart object. is it impossible too?
I mean my script function returns something like "100, 200, 300". I wanna pass that values to barchart. when I want to add aplet tag to jsp code instead of writing:
<param name="s1_value" value="100,200,300">
I want to write somethin like:
<param name="s1_value" value="myscriptfunction()">
is it possible in JSP? I saw an example like this in asp. it was like:
<param name="sampleLabels" value="<%call func1()>">. but in JSP it seems like call tag doesn't work. Is it possible in JSP?

Similar Messages

  • I want to assign the value of a Javascript variable to JSP Variable

    I want to assign the value of a Javascript variable to JSP Variable .. for example :
    <%
    Bla Bla Bla
    %>
    <script>
    var JavaScriptVariable="hello"
    </script>
    <%
    String JSPVariable=// The Value of JavaScriptVariable ;
    %>
    How can i do that ??
    Thanks

    >I want to assign the value of a Javascript variable to JSP Variable
    cannot be done.Friend try to understand concepts properly Javascript is always excuted by the browser @clientside where as JSPCode is executed Websever(ServletContainer) @serverside.Through you are combining JSP Code blocks(Tags,Expressions,scriptlets...) & javascript under a single page webserver can only identify what is their under JSP Code blocks.
    Hope this could be an appropriate answer for your question.
    However,you can as well submit a request by encoding your URL with request parameters and the submit to the page and then collect it using request.getParameter(name).
    But under a single context state it is not possible
    REGARDS,
    RaHuL

  • PL/SQL Function call error while reading or assigning returned value

    Hi,
    I am getting the following error while tryih to read the value of the PL/SQL Function. I am calling a function in one of my PL/SQL Packages passing mutliple IN parametes and the function returns some value back. Now on BPEL side when I try to read the return value I am getting an error:
    *<summary>*
    empty variable/expression result.
    xpath variable/expression expression "/ns3:OutputParameters/ns3:TEST_FUNCTION" is empty at line 124, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns3:OutputParameters/ns3:TEST_FUNCTION" is not empty.
    *</summary>*
    Even though in the console when I check the Invoke Output Parameter it does shows me a valid value being retuned by a Function but when I am trying to Assgn this value to some variable using Assign Activity I get the above error.
    Even though all goes fine but looks like I am not able to read or assign the value returned from the Function.
    So just wondering if this even works as to me I have a very simple example and that seems not to work. Function is called successfully and is returning the value as I can see it in the BPEL console but when tryin to read or assign that value to some other variable I get the above error.
    Any ideas?
    Thanks

    This issue has come up a lot. The problem is with a mismatch between the version of JDeveloper and SOA. You'll encounter namespace issues if you use 10.1.3.1 in combination with 10.1.3.3 (or 10.1.3.4). You MUST synchronize both JDev and SOA to 10.1.3.3 or 10.1.3.4 (mixing 10.1.3.3 and 10.1.3.4 is OK). We changed when going to 10.1.3.3 by adding elementFormDefault="qualified" to the generated XSD. We used the default "unqualified" in 10.1.3.1. So you'll encounter namespace issues unless you're using 10.1.3.3 or higher JDev AND SOA. The fact that I see &lt;*db:*...&gt; tells me that you're using 10.1.3.1 JDeveloper. The correct solution is to upgrade your components.

  • How to get value stored in  javascript function and display in a JSP

    i am doing a questionaire which is for user to input data in every question, After user input the data, a javascript function will be called to do some score calculation. Since each question will carry its final score after the calculation by the javascript function, so i use an array to store those scores and then display those scores in the same page.
    However, i have to make a confirmation page to display both data and calculated score in another jsp, i only know how to display the data as it is a textfield that i can get the value by "request.getParameter("textfield1"); but i dun know how to get those scores as they are stored in an array in the javascript function, what way i can do??

    thank you for all your help!
    I have chosen to set the score value to the hidden field when every time run the function
    <script language="javascript">
    function cal(index){
    var thisForm = document.MC;
    thisForm.score1.value=score[index];//set value to the hidden field     
    </script>
    <input type="hidden" name="score1" value="">
    <input type="hidden" name="score2" value="">
    <input type="hidden" name="score3" value="">
    The function will calculate only one score when every time being called. So that i can only assign one score to one hidden value at a time.
    e.g, assign score[1] to thisForm.score1.value
    assign score[2] to thisForm.score2.value
    assign score[3] to thisForm.score3.value
    how can i do this??

  • Trying to Assign Return Value from DB Adapter that calls a Database Functio

    We have a BPEL process in which we have set up a DB Adapter to call a function in the Database and return the value (the actual value being returned is Workers=14 Hours=36 Vehicles=2). When we try to assign that returned value to a string value which will show in our task list , the below seems to assign the follwing -<crewsize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <GCS_LAB_VEH_CNT_FUNC xmlns="">Workers=14 Hours=36 Vehicles=2
    </GCS_LAB_VEH_CNT_FUNC>
    </crewsize>, and then whe it shows in the task, crewsize is blank.. What are we doing wrong??
    Bonnie and Rox
    Assign_gcs_veh_hrs
    [2008/01/31 09:37:10] Updated variable "Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable"less
    -<Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    -<InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/EPAGES/GCS_LAB_VEH_CNT_FUNC/">
    <P_PROJ_ID>85504
    </P_PROJ_ID>
    <P_PHASE_ID/>
    <P_PE_ID/>
    </InputParameters>
    </part>
    </Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    [2008/01/31 09:37:10] Updated variable "Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable" More...
    -<Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    -<InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/EPAGES/GCS_LAB_VEH_CNT_FUNC/">
    <P_PROJ_ID>85504
    </P_PROJ_ID>
    <P_PHASE_ID>1
    </P_PHASE_ID>
    <P_PE_ID/>
    </InputParameters>
    </part>
    </Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    [2008/01/31 09:37:10] Updated variable "Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable"less
    -<Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    -<InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/EPAGES/GCS_LAB_VEH_CNT_FUNC/">
    <P_PROJ_ID>85504
    </P_PROJ_ID>
    <P_PHASE_ID>1
    </P_PHASE_ID>
    <P_PE_ID>1
    </P_PE_ID>
    </InputParameters>
    </part>
    </Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    Invoke_gcs_veh_hrs
    [2008/01/31 09:37:13] Invoked 2-way operation "get_gcs_veh_hrs" on partner "get_gcs_veh_hrs".less
    -<messages>
    -<Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    -<InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/EPAGES/GCS_LAB_VEH_CNT_FUNC/">
    <P_PROJ_ID>85504
    </P_PROJ_ID>
    <P_PHASE_ID>1
    </P_PHASE_ID>
    <P_PE_ID>1
    </P_PE_ID>
    </InputParameters>
    </part>
    </Invoke_gcs_veh_hrs_get_gcs_veh_hrs_InputVariable>
    -<Invoke_gcs_veh_hrs_get_gcs_veh_hrs_OutputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    -<db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/EPAGES/GCS_LAB_VEH_CNT_FUNC/">
    <GCS_LAB_VEH_CNT_FUNC>Workers=14 Hours=36 Vehicles=2
    </GCS_LAB_VEH_CNT_FUNC>
    </db:OutputParameters>
    </part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]
    </part>
    </Invoke_gcs_veh_hrs_get_gcs_veh_hrs_OutputVariable>
    </messages>
    Assign_gcs_veh_hrs_out
    [2008/01/31 09:37:13] Updated variable "outputVariable"less
    -<outputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    -<BranchCritChg1ProcessResponse xmlns="http://xmlns.oracle.com/BranchCritChg1">
    <moveid/>
    <customer/>
    <packcount/>
    <carrierref/>
    <transferee/>
    <projid>85504
    </projid>
    <weight/>
    -<crewsize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <GCS_LAB_VEH_CNT_FUNC xmlns="">Workers=14 Hours=36 Vehicles=2
    </GCS_LAB_VEH_CNT_FUNC>
    </crewsize>
    <phaseid>1
    </phaseid>
    <miles/>
    <vehicles/>
    <eventid>1
    </eventid>
    <authority/>
    <liftvans/>
    <ritsreg/>
    <goodstype/>
    <containernum/>
    <request1>Start Time: 03/31/2007 02:25 PM
    </request1>
    <current/>
    <request2/>
    <request3/>
    <request4/>
    <request5/>
    <request6/>
    <request7/>
    <comments/>
    <dispatch_group/>
    </BranchCritChg1ProcessResponse>
    </part>
    </outputVariable

    Hello Rajesh,
    I do not know if this is the problem in your case, but I would look at the source XML:
    <db:OutputParameters xmlns:...
    As you can see, the namespace for the db:OutputParameters is db, while you are referring to ns11:OutputParameters in your xpath expression;
    getVariableData('InvokeGetItems_GetItemDetails_OutputVariable_1','OutputParameters','/ns11:OutputParameters/ns11:P_ITEMNAME_O')
    So I would try to change ns11:OutputParameters to db:OutputParameters, and see if you get lucky?
    Cheers,
    Rune

  • Value Passing using JavaScript function portalpagenav

    Hi,
    We have used Java script to pass two values from one report to another report.
    Ex : Country , type are the columns which we have to pass it to other report.If you click country column it should pass only country value,have given javascript in country column to go to report 1 and if you click type column then it should pass both country and type value,have given javascript in type column to go to report 2.
    I m passing the values via variables so need to declare the variables in the corresponding column.So, we have taken country and type column again in the critriea to declare the variables, we have done with this,but the problem is we wanted to hide those extra columns in the report when we download in to excel and others.
    Regards,
    Murali

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • Unable to retreive the return value of pl/sql function using DB Adapter

    Dear Experts,
    I am using DB Adapter in my BPEL Process. Using DB Adapter I am invoking a PL / SQL function. I am able to send two input parameters for the pl/sql function. But I dont know how to retrieve the return value from the function. Please suggest me.
    Thanks,
    Rajesh

    Yes I am returning a value from PL/SQL function.
    Please see the code segments below,
    FUNCTION "TD_INSERT" (a TDINIT_TYPE, stops TDDETAIL_TABLE )
    RETURN VARCHAR2
    AS
    td_no Number;
    td_id Number;
    stop TDDETAILFULL_TYPE;
    length number;
    BEGIN
    insert into TD_INIT values( ----passing all the values here --------- );
    select max(tdno) into td_no from TD_INIT ;
    length := stops.count;
    for i in 1.. length loop
    stop := stops(i);
    insert into TD_DETAIL_FULL values(
    td_no, ------- );
    end loop;
    commit;
    RETURN td_no;
    END;
    Thanks,
    Rajesh

  • Parsing JSP values on to javascript functions

    HI
    Is it possible for Javascript functions to accept JSP variables?
    For instance:
    <script language="Javascript">
    function selectEdit(fileID) {
       document.forms[0].recordID.value = fileID;
       document.forms[0].submit();
         </script> and a button calls the method like this:
       <input type="submit" name="Submit" value="View" onClick="selectEdit('<%= Record %>'")> I tried but was unsuccessful, can someone help?
    Thanks
    Eugene

    Lets say you use your JSP to generate a set of links
    page1.jsp:
    <form target="targetPage.jsp">
    <input type="hidden name="recordId");
    <% for (int record=0; record<10; record++){  %>
      <input type="submit" name="Submit" value="View" onClick="selectEdit('<%= record %>')">
    <%  }  %>
    </form>This JSP code runs, and generates the following
    <form target="targetPage.jsp">
    <input type="hidden name="recordId");
    <input type="submit" name="Submit" value="View" onClick="selectEdit('0')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('1')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('2')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('3')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('4')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('5')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('6')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('7')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('8')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('9')">
    </form>This gets sent to your browser on displayed on screen
    When you click on the appropriate button, it calls your function selectEdit, which sets the value of the hidden field according to which button you pushed.
    It then submits the form, to targetPage.jsp
    targetPage.jsp retreives the value using request.getParameter("recordId");
    which is the name of the hidden field being submitted.
    JSP reacts to form submissions, and produces an HTML page.
    The HTML page can then run java script
    JSP gets run again when you submit the form.
    Hope this helps,
    evnafets

  • Another assignment, return values

    I know I have poset another unresolved problem, but that's bigger one, so I think I'll bide my time with that one. The issues with it was simply more substainsial than I thought so I guess I'm not quite ready for it... I have another assignment though, smaller one:
    I have to return values form an array that is greater than some k value, and what I'm accustomed to do, is to simply run through the array with a for-loop and if one element is greater than k, then print it out...
    However this assignment explicitly says that I should hand the array and the k value over to a method with int as return type, and that confuses me because I thought java couldn't return more than one thing at a time.
    class Main{
       public static void main( String[] args ){
          int k = -1;
          int[] array = { -3, 2, -7, 5, 4, -1, 0, -6 }
          A link = new A();
          System.out.print("The numbers greater than k are: "
                     + link.greaterNumbers( array, k );
    class A{
       public int greaterNumbers( int[] data, int k ){
       * Here I would normally just change the return type to void,
       * and print the numbers out in a for-loop, but I can't do that here.
       * So I'm unsure what to do.
       return something;
    }Edited by: kreaturen on Aug 11, 2011 5:45 PM
    Edited by: kreaturen on Aug 11, 2011 5:49 PM
    Edited by: kreaturen on Aug 11, 2011 6:08 PM

    kreaturen wrote:
    ...the return type is specified as int......but yet...
    I have to return values form an array So, even though you're new to Java you should be able to apply some common sense and reasoning here.
    On the one hand, you say you have to return an int. On the other hand, you say you have to return values. Now, even though you're a beginner, I would think you would recognize that "an int" is a single number, while "values" can encompass multiple numbers.
    You understand that much, right?
    Now my question is, how do you reconcile that discrepancy? Was one or the other just a typo? Or did you on the one hand think you have to return "an int" and on the other hand think you have to return multiple values, and just didn't notice the contradiction? Or do you just not understand the instructions? (Perhaps you're supposed to return an int representing how many values meet the criteria, rather than returning the values themselves?)
    Now you can see that before you do anything else, you must clarify the above, so that you are sure exactly what you're supposed to return and you can communicate clearly to the forum exactly what that requirement is.

  • Get the return value of an RFC function / BAPI

    Hello,
    I'm a Web Dynpro Java beginner and I try to get the return value (domain: NUMC6) of an RFC function without success.
    Here is what I do, could you please tell me what is wrong?
    First, here is my context:
    Context
    |
    |---- ZMy_Bapi
         |
         |---- MyOutputResult
         |     |
         |     |---- MyReturnValue
         |
         |---- MyInput
    My model:
    MyModel
    |
    |---- ZMy_Bapi_Input
         |
         |---- Output
         |     |
         |     |---- ZMy_Bapi_Output
         |          |
         |          |---- Return_Value
         |
         |---- Input_Value
    The mapping between them:
    - MyInput is mapped to Input_Value
    - MyReturnValue is mapped to Return_Value
    And my code:
    ZMy_Bapi_Input bapiInput = new ZMy_Bapi_Input();
    wdContext.nodeZMy_Bapi().bind(bapiInput);
    bapiInput.setInput_Value("A value");
    executeZMy_Bapi();
    ZMy_Bapi_Output bapiOutput = new ZMy_Bapi_Output();
    wdContext.nodeMyOutputResult().bind(bapiOutput);
    IMyOutputResultElement outputElement = wdContext.nodeMyOutputResult().currentMyOutputResultElement();
    String result = outputElement.getMyReturnValue();
    Finally, here is the code of the executeZMy_Bapi() function:
    try {
         wdContext.currentZMy_BapiElement().modelObject().execute();
         wdContext.nodeMyOutputResult().invalidate();
    } catch (Exception ex) {
         ex.printStackTrace();
    My problem is that "result" keeps being empty
    Thanks in advance for your help!

    It still doesn't work, I'm gonna turn crazy!
    But there is one good point: I get the method you mentioned: getZMy_Bapi_OutputElementAt and getMyReturnValue without casting, just as you said first.
    Here are the updated context, model, mapping and code.
    Context:
    MyContext
    |
    |---- ZMy_Bapi
         |
         |---- MyOutputResult
         |     |
         |     |---- ZMy_Bapi_Output
         |          |
         |          |---- MyReturnValue
         |
         |---- MyInput
    Model:
    MyModel
    |
    |---- ZMy_Bapi_Input
    |     |
    |     |---- Output
    |     |     |
    |     |     |---- ZMy_Bapi_Output
    |     |          |
    |     |          |---- Return_Value
    |     |
    |     |---- Input_Value
    |
    |
    |---- ZMy_Bapi_Output
         |
         |---- Return_Value
    Mapping
    ZMy_Bapi     --> ZMy_Bapi_Input
    MyOutputResult     --> Output
    ZMy_Bapi_Output     --> ZMy_Bapi_Output
    MyReturnValue     --> Return_Value
    MyInput          --> Input_Value
    Code
    ZMy_Bapi_Input bapiInput = new ZMy_Bapi_Input();
    wdContext.nodeZMy_Bapi().bind(bapiInput);
    bapiInput.setInput_Value("A value");
    executeZMy_Bapi();
    ZMy_Bapi_Output bapiOutput = new ZMy_Bapi_Output();
    wdContext.nodeMyOutputResult().bind(bapiOutput);
    String result = "";
    for (int i = 0; i < wdContext.nodeZMy_Bapi_Output().size(); i++) {
         IZMy_Bapi_OutputElement resultElem = wdContext.nodeZMy_Bapi_Output().getZMy_Bapi_OutputElementAt(i);
         if (resultElem.getMyReturnValue() != "" && resultElem.getMyReturnValue() != null) {
              result = resultElem.getMyReturnValue();
    Edited by: Franis Pignon on Oct 17, 2008 11:16 PM

  • How to use return value from TestComplete ( using COM) as a variable in the conditional statement (e.g. while loop) in TestStand

    Hi,
    I have setup a COM interface for TestStand(TS) to run certain scripts in TestComplete (TC).  Normally, when TestComplete finishes executing the script, it returns a 0 or 1 to denote pass/fail in the TestStand step (e.g String value test step).  This worked fine.
    However, now I need TestComplete to return a vaule( e.g 32) to TS, and TS need to evalue this value in a while statement. So if TC return value is 32, I'd have some statement in TS ike :                                                                                                 
    While (return value != 30)
    Do something..
    Thanks,
    Solved!
    Go to Solution.

    There are a hundred ways to implement what you are asking.  The hard part is deciding which one would be the best for you.
    What adapter are you using to communicate with TestComplete?  ActiveX?  Is TestComplete running asynchronously (in parallel)?  If so then how is the data getting back to TestStand?
    So here are some options:
    1. You can use the While Step type.  It's in the Flow Control folder in your Step Types pallette.  Look in your examples under UsingFlowControlSteps.seq in the SequenceFlow
    2. You can loop on a step and have the termination for the loop be (return value == 30).  Look in the Step Properties under Looping.  Also in the TestStand help
    3. You could do Post Actions based on a condition and have it jump to another step.  Read about it in the TestStand Reference Manual.
    4. You could use a GoTo step.  I don't really recommend this one.  It makes code hard to maintain.  Also an example in SequenceFlow called gotobeep.seq.
    Hopefully this gets you thinking.  Let me know if you have specific questions about any of these methods.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to pass a binding value to a Javascript function?

    Hi, I have this:
    A binding: #{bindings.DOCUMENT_ID.inputValue}
    A javascript inserted into the page in this way:
    <af:commandButton text="Ver Documento" id="cb1"
    icon="/Images/Document-Preview-icon.png">
    <af:clientListener method="openViewer('#{bindings.DOCUMENT_ID.inputValue}')"
    type="click"/>
    <af:resource type="javascript" source="/openViewer.js"/>
    </af:commandButton>
    But doing this generates this error: Error(44,34): Static attribute must be a String literal, its illegal to specify an expression.
    Any suggestions?
    Thanks in advance.

    First solution doesn't work:
    OracleJSP error: oracle.jsp.parse.JspParseException:
    /PantallaSup.jspx: Line # 45, <af:clientListener method="openViewer('${bindings.DOCUMENT_ID.inputValue}')" type="click" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"/>
    Error: Expression Language not supported in compile time attribute method

  • How to assign a value of the bean to a js variable.

    Hi,
    Im getting some values from the DB which is stored in a list , Now the list is sent across to the jsp through the bean.
    I need to get the length of the list
    I tried something like this.
    <script>         
    var size = <% rmaLicenseTransferForm.slfextUiElements.size(); %>
    </script>rmaLicenseTransferForm is the name of the formBean and slfextUiElements is the name of the list.
    I guess this wont work....by the way i using struts framework.....
    Thanks

    Use the JSTL fn:length tag.

  • Using javascript return values in links

    Can anyone please tell me if there is a way to use the return value from a javascript function as a parameter in a link?
    Thanks,
    Chris

    You mean in PFR of controller , ie after user selects a record from LOV window and after its populated back into to the textItem on the main entry form ??
    The value is displayed correctly in the intended textItem which has viewInstance and viewValue attached to it .
    so this is what setup looks like
    Entry form
    Customer Name - lov
    Customer Number(d) - Display Only - Populated by Lovmappings from LOV - mapped to Customer Number attribute on LOV window. It also has viewInstance and ViewAttrib assigned to it .
    Save Action
    At this point of time , i am assuming i already have value in Customer Number(d)since its displayed on the screen,rite ??
    or Do i have to take the value in formValue and then explicitly do a setAttribute to set that value to view object /Customer Number(d)
    hope this helps to understand the scenario

  • Accessing function's return value

    Hi there. I have created several pl/sql procedures and functions that I can run as standalone programs and I have no problem integrating them into my java code also. However I cannot access the return value of any created function from my java code. The functions appear to execute correctly because when I deliberately enter an invalid select statement I get the errors I expect to get for that instance nad if I enter a valid select statement in the function the program executes correctly but I still cannot access the function's return value. My java code where I execute the pl/sql function is as follows:
    CallableStatement p = cont.conn.prepareCall("{call ? := Hellen.FUNC}");
    p.setString(1, "z006"); //hellen.FUNC = function name
    p.execute();
    How do I access the return value of my function?
    Do I need to get a ResultSet?
    My function is as follows:
    function func
    return varchar
    is tester varchar(4);
    BEGIN
    select cfcc_code into tester from hellen.test1 where test1.cfcc_code = 'A21';
    return tester;
    END;
    Any help will be gratefully received, Joe

    You need to do something like
    p.registerOutParameter(1, java.lang.String);
    p.execute();
    String result = p.getString(1);Cheers, APC

Maybe you are looking for