Handling the return values and passing values to a dialog

Dear all,
I am trying to return values from a dialog to a page.
I am following a tutorial:
http://www.oracle.com/technology/products/jdev/101/howtos/adfdialog/index.html
its okey, but I couldnt understand the following code:
public void handleReturn(ReturnEvent event)
if (event.getReturnValue() != null)
Customer cst;
String name;
String psw;
cst = (Customer)event.getReturnValue();
CustomerList.getCustomers().add(cst);
name = cst.getFirstName();
psw = cst.getPassword();
inputText1.setSubmittedValue(null);
inputText1.setValue(name);
inputText2.setSubmittedValue(null);
inputText2.setValue(psw);
please help me what are these variables?
that I could be able to map with me own.
Regards:
Muhammad Nadeem
[email protected]

If you look further down on the tutorial, you will notice that these values are set in the dialog done() and cancel() actionListeners. Similarly, you will return your own object(s) when calling returnFromProcess() - see the done() method.
Regards,
Nick

Similar Messages

  • How to pass the return value?

    when i call another procedure in a different vi file(xxx.sql), how am i going to pass the return value that the end user key in?
    how to Promt the message and accept the value that keyed in?
    Please help...
    this is urgent!
    Thank you.

    Use OUT paramter to pass values from called procedure.
    You can pass the values as IN / IN OUT / OUT
    parameters.
    For sample coding please mail
    null

  • Call C# method from javascript in WebView and retrieve the return value

    The issue I am facing is the following :
    I want to call a C# method from the javascript in my WebView and get the result of this call in my javascript.
    In an WPF Desktop application, it would not be an issue because a WebBrowser
    (the equivalent of a webView) has a property ObjectForScripting to which we can assign a C# object containg the methods we want to call from the javascript.
    In an Windows Store Application, it is slightly different because the WebView
    only contains an event ScriptNotify to which we can subscribe like in the example below :
    void MainPage_Loaded(object sender, RoutedEventArgs e)
    this.webView.ScriptNotify += webView_ScriptNotify;
    When the event ScriptNotify is raised by calling window.external.notify(parameter), the method webView_ScriptNotify is called with the parameter sent by the javascript :
    function CallCSharp() {
    var returnValue;
    window.external.notify(parameter);
    return returnValue;
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = DoSomerthing(parameter);
    The issue is that the javascript only raise the event and doesn't wait for a return value or even for the end of the execution of webView_ScriptNotify().
    A solution to this issue would be call a javascript function from the webView_ScriptNotify() to store the return value in a variable in the javascript and retrieve it after.
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = ReturnResult();
    await this.webView.InvokeScriptAsync("CSharpCallResult", new string[] { result });
    var result;
    function CallCSharp() {
    window.external.notify(parameter);
    return result;
    function CSharpCallResult(parameter){
    result = parameter;
    However this does not work correctly because the call to the CSharpResult function from the C# happens after the javascript has finished to execute the CallCSharp function. Indeed the
    window.external.notify does not wait for the C# to finish to execute.
    Do you have any solution to solve this issue ? It is quite strange that in a Window Store App it is not possible to get the return value of a call to a C# method from the javascript whereas it is not an issue in a WPF application.

    I am not very familiar with the completion pattern and I could not find many things about it on Google, what is the principle? Unfortunately your solution of splitting my JS function does not work in my case. In my example my  CallCSharp
    function is called by another function which provides the parameter and needs the return value to directly use it. This function which called
    CallCSharp will always execute before an InvokeScriptAsync call a second function. Furthermore, the content of my WebView is used in a cross platforms context so actually my
    CallCSharp function more look like the code below.
    function CallCSharp() {
    if (isAndroid()) {
    //mechanism to call C# method from js in Android
    //return the result of call to C# method
    } else if (isWindowsStoreApp()) {
    window.external.notify(parameter);
    // should return the result of call to C# method
    } else {
    In android, the mechanism in the webView allows to return the value of the call to a C# method, in a WPF application also. But I can't figure why for a Windows Store App we don't have this possibility.

  • Query from the data abse  and pass values to a pdf form

    query from the data abse and pass values to a pdf form
    Hello
    Hello i have this html report that i have written to output a
    report.
    now, i am assigned to pass the same fields to a pdf form so
    the fields in the adaobe form can be populated or the term
    Pre-populate the form.
    can anyone help me get started.
    first i would like to know if it can be done.
    second, what do i need to get started (tools )
    third how do i do this.
    i am really lost at this point.
    can anyone give me tips in how to approach this
    subject??

    It can be one using Adobe Acrobat Designer which is packaged
    with Acrobat
    Professional Pro 7. It uses all XML to create and populate
    forms.
    If you had the time, you can also create <cfdocument
    type="pdf"> to have
    them ready and just pass the info to it so it autogenerates
    the PDF on the
    fly.

  • Handling Popup Return Values

    Hi
    I have created a popup that I can pass values to, perform a search in, and return an object from with the values I want set. It works fine.
    The problem I have is I want to display one value from the returned object and have another value hidden but available when the originating page submits.
    If I display both values in fields on the originating form so they can be seen, all is well. If I try and use a hidden field there is no partial trigger attribute so it doesn't work. If I use a standard text field but change the render attribute to false so it doesn't display, I don't have a value submitted.
    The only solution I have so far is to record the value I don't want displayed in my session bean, maybe this is the excepted approach?
    Tom
    Message was edited by:
    user571146

    Errrr, don't know is the honest answer.
    I'm new to using JDev and the ADF stuff.
    It would seem the hiddenInput field is no good because of the missing PartialTrigger attribute.
    If I use the normal text field and turn rendering off then I can set the PartialTrigger, in the return handler I use the lines...
    inputText4.setSubmittedValue(null);
    inputText4.setValue(d.getId());
    to set the value, as describe in the SRDemo example.
    I then use EL to read the value back later on when I am handling the submit of the entire page.
    If I set the render attribute to false the, I don't appear to get a value back from the EL.
    Does that make more sense?
    Tom

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • How to Change the return value for the parameters

    Hi, Can anyone help me with my problem?
    I have a parameter called "P1_Projects" defined in the HTMLDB page, on the report region, there are 2 buttons, one is "Go" button to submit the report on the screen, so user can preview the report, then another button "Export to PDF" can be clicked to generate the report using Oracle Report Services. The "Export to PDF" button will use the same set of parameters submitted for the "Go" button.
    So, the parameter "P1_Projects" is being used by these 2 buttons. and I have to pass a "%" wild card for "All Projects". To make the "Export to PDF" button work, I have to safe encode the return value for "%" to "%25" in order to pass the URL formula, but now my "Go" button doesn't work with "%25", it only recognize the "%" wild card.
    Is there a way to conditionally change the value depends which button is clicked?
    Any hint or help is highly appreciated!
    Hong

    try creating a plsql process which sets the P1_Projects item as required.
    in the plsql you can do:
    if :REQUEST = 'GO' then
    xxx
    else
    xxxx
    end if;
    set the condition to plsql expression:
    :REQUEST in ('GO', 'EXPORT')
    NB. the request value is usually set to the button name when a page is submitted from a button

  • How to store the return value from a select list in page item ?

    I'm sorry, I'm sure you will all flame me for this (and its long too :-(. I'm still trying to pick this up and havn't had time to read manual and this forum and up against the clock (as usual), but this must be something thats simple to do, otherwise why have 2 cols on LOV (display text and return value.
    normal kind of thing - master /detail, a master table and a detail table, master.id is PK in master, master.name is the name of the master item. detail.id is pk in detail, detail.mid is foreign key to master.id. I have a tabular report that displays a join of cols from master and detail, with 2 cols being links, one is a link on master.name, that passes master.id to page P1 and it displays a row from master. The other col displays detail.name and passes detail.id to page P3, P3 displays a row of the detail table.
    I want to populate a LOV with possible master.name values, but display the name of the current P3_MID value (from detail.mid). Then a user can pick a different master and it needs to update P3_MID so on submit it updates the row.
    I just can't seem to see in the manual how you can specify where the return value on a LOV goes?
    As I said, sorry for long post and not having had time to read docs correctly - someone just point me at the subject matter somewhere, please.

    Sorry, I was trying to be to complex and obviously APEX is just too damn cleaver - I figured out how this works - basically APEX pulls the LOV and then matchs the mid to it to display the correct name - simple and easy - just me making it difficult

  • How to set the returned value of CFL in a matrix

    dear all,
    I got a matrix binded to a DataSource and two CFLs are in this matrix. The codes for handling AfterChooseFromList is as following.  It works almost fine. But when a docoment containing more than two
    rows in the matrix and I reselect the CFL cell values more than two times, an error occured sometimes, not everytime. The error message is "This entry already exists in the following tables @CYW_PRROW [Message 131-183]"
    I have tried to find out what kind of situation to cause this error, but still in the mud.
    Can anybody give me some suggestion? Thanks.
    Public Sub OnAfterChooseFromList_Matrix(ByVal pVal As SAPbouiCOM.ItemEvent)
            Dim ActionSuccess As Boolean = pVal.ActionSuccess
            Dim oform As SAPbouiCOM.Form = SBO_Application.Forms.Item(pVal.FormUID)
            Dim oitem As SAPbouiCOM.Item = oform.Items.Item("mtx_0")
            Dim omatrix As SAPbouiCOM.Matrix = CType(oitem.Specific, SAPbouiCOM.Matrix)
            Dim oDataTable As SAPbouiCOM.DataTable
            oDataTable = pVal.SelectedObjects
            Dim val As String
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
            omatrix.GetLineData(pVal.Row)
            oform.DataSources.DBDataSources.Item("@CYW_PRROW").Offset = pVal.Row - 1
            If pVal.ColUID = "col_0" Then
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRItemCode", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            Else
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRSupp", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            End If
            omatrix.SetLineData(pVal.Row)
            If pVal.FormMode = "1" Then
                oform.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
            End If
        End Sub
    Another quesion, can I assign the returned value of CLF directly to the cell?

    Hello  Chao-Yi Wu,
    I don't have a real solution for you - just a few comments:
    1. At
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    I would add
            Try
                if oDataTable Is Nothing Then Exit Sub ' If the User cancels the CFL
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    2. At
       If pVal.ColUID = "col_0" Then
    I would make the branch by the pVal.ChooseFromListUID instead of the ColUID
    and the 2nd not with "Else" but with "Else If ....."
    3. It may work with EditText.String/Value of a cell but I never do that because of performance-reasons.
    I always do it the same way as you in principle - I don't really know what the problem is.
    4. Maybe some unique indexes on your table (although this should give an error at the update and not at CFL when "the unique-law is broken"...)?
    Sorry - that's all for the moment.
    Cheers,
    Roland

  • The returned value of BAPI call

    Hi, experts,
    I have a question about returned value of BAPI call.
    when the returned value is mapped as an attribute and this return value itsself is of the type: table of a certain structure. Is there any possibility that the value of this table still can be extracted from the mapped attribute? If it is possible, how?
    If not, how should this kind of situation be handled:
    when the returned value of the function at the backend has more one layer structure?
    Thanks and best regards,
    Fan

    In my experience you shouldn't use the service wizard to generate the context of such deeply nested structures. They don't generate or map correctly because it tries to put the table type as the type of the context attribute.
    Instead you should propery model the relationship in the context using nested nodes. Here is an example of address <-> address text where you can have multiple address texts per address.  From the service this was a returned nested table.
    ****BP Address and Address Text
      data lo_nd_bp_addr type ref to if_wd_context_node.
      data lo_nd_bp_addr_text type ref to if_wd_context_node.
      data lo_el_bp_addr type ref to if_wd_context_element.
    * navigate from <CONTEXT> to <BP_ADDR> via lead selection
      lo_nd_bp_addr = wd_context->get_child_node( name = wd_this->wdctx_bp_addr ).
      lo_nd_bp_addr->bind_table( wd_this->gt_bp_addr ).
    ****Add the Address Text Table as Child of each Address Context Record
      data element_set type wdr_context_element_set.
      field-symbols <wa_set> like line of element_set.
      field-symbols <wa_bp_addr> like line of wd_this->gt_bp_addr.
      element_set = lo_nd_bp_addr->get_elements( ).
      loop at element_set assigning <wa_set>.
        read table wd_this->gt_bp_addr index sy-tabix assigning <wa_bp_addr>.
        lo_nd_bp_addr_text = <wa_set>->get_child_node( name = if_componentcontroller=>wdctx_bp_addr_text ).
        lo_nd_bp_addr_text->bind_table( <wa_bp_addr>-t_text ).
      endloop.

  • HTMLDB_ITEM.SELECT_LIST the the return values

    All
    Looking over the docs it states that p_value should be the value you want to show by default, so if you did not put your primary key in this field and just entered one of the texts in p_list_values and wanted to use the return value of p_list_values how would you access it.
    Example.
    select HTMLDB_ITEM.SELECT_LIST(1,'keep','Keep;accid,Delete;accid')
    This would make keep the default selected, but when you pass this to a process, how do you tell if the user selected keep or delete and then pull out the primary key value accid, so that you can update or delete the table.

    I was able to work through this problem. Thank You.

  • Router not seeing the return value from a webservice

    Hello. I have two input fields and a button that calls a web service, is an action that is passed to a router.
    So it looks like this form-->execute web service-->router-->decision
    I'm passing back a string of success or failure as follows:
    @WebMethod
    public String doLogin(String userName, String password)
    if(userName.equals("1"))
    return "failure";
    return "success";
    It executes the method fine, but the router doesn't see the return value correctly. It always evaluates to false (which is the default)
    My text boxes and button is defined as follows:
    <af:inputText value="#{bindings.arg0.inputValue}"
    label="Username:"
    required="#{bindings.arg0.hints.mandatory}"
    columns="#{bindings.arg0.hints.displayWidth}"
    maximumLength="#{bindings.arg0.hints.precision}"
    shortDesc="#{bindings.arg0.hints.tooltip}">
    <f:validator binding="#{bindings.arg0.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.arg1.inputValue}"
    label="Password:"
    required="#{bindings.arg1.hints.mandatory}"
    columns="#{bindings.arg1.hints.displayWidth}"
    maximumLength="#{bindings.arg1.hints.precision}"
    shortDesc="#{bindings.arg1.hints.tooltip}">
    <f:validator binding="#{bindings.arg1.validator}"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.doLogin.execute}"
    text="doLogin"
    disabled="#{!bindings.doLogin.enabled}"
    action="doLogin"/>
    </af:panelFormLayout>
    My loginpagedef.xml is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.51.88" id="loginPageDef"
    Package="customerportal.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables">
    <variable Type="java.lang.String" Name="doLogin_Return"
    IsQueriable="false" IsUpdateable="0"
    DefaultValue="${bindings.doLogin.result}"/>
    <variable Type="java.lang.String" Name="doLogin_arg0"
    IsQueriable="false"/>
    <variable Type="java.lang.String" Name="doLogin_arg1"
    IsQueriable="false"/>
    </variableIterator>
    </executables>
    <bindings>
    <methodAction id="doLogin" RequiresUpdateModel="true" Action="invokeMethod"
    MethodName="doLogin" IsViewObjectMethod="false"
    DataControl="OracleWebServices"
    InstanceName="OracleWebServices"
    ReturnName="OracleWebServices.methodResults.doLogin_OracleWebServices_doLogin_result">
    <NamedData NDName="arg0" NDValue="${bindings.doLogin_arg0}" NDType="java.lang.String"/>
    <NamedData NDName="arg1" NDType="java.lang.String"
    NDValue="${bindings.doLogin_arg1}"/>
    </methodAction>
    <attributeValues IterBinding="variables" id="arg0">
    <AttrNames>
    <Item Value="doLogin_arg0"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="variables" id="arg1">
    <AttrNames>
    <Item Value="doLogin_arg1"/>
    </AttrNames>
    </attributeValues>
    </bindings>
    </pageDefinition>
    What am I doing wrong? I can never seem to get the router to view the result coming back from the web service. Thanks in advance!

    Hi,
    Can you try this
    <method-call id="DepartmentCheck">
    <method>#{bindings.DepartmentCheck.execute}</method>
    <return-value>#{pageFlowScope.checkResult}</return-value>
    <outcome>
    <fixed-outcome>result</fixed-outcome>
    </outcome>
    </method-call>
    <router id="routerReturnCheck">
    <case>
    <expression>#{pageFlowScope.checkResult==true}</expression>
    <outcome>succes</outcome>
    </case>
    <default-outcome>return</default-outcome>
    </router>
    just put the result of a method in pageFlowScope variable then the flow case go the router where you evaluate the variable
    hope this helps

  • FindAndReplace What is the returned value

    I have found a function used in some NI sample code FindAndReplace() and it doesnt show as a teststand function. Anybody used it or know what the return values are and any optional parameters ?

    Rupert -
    In the TestStand expression language there is a SearchAndReplace function which returns the modified string. What is the code snippet, is it C, C++, expression?
    Scott Richardson (NI)
    SearchAndReplace(string, searchString, replacementString, , , , , )
    This function searches for and replaces one or more substrings with the replacementString.
    Parameter 1: A string in which to perform substring replacements.
    Parameter 2: The substring to find and then replace with the replacement string.
    Parameter 3: The replacement string.
    Parameter 4: An optional number that specifies the zero-based character index at which to begin searching. The default is 0.
    Parameter 5: An op
    tional Boolean that specifies whether to ignore character case when searching. The default is False.
    Parameter 6: An optional number that specifies the maximum number of occurrences of substring to replace. A value of -1 signals the function to replace all occurrences of the substring. The default is -1.
    Parameter 7: An optional Boolean that specifies whether to search the string in reverse. The default is False. If you pass True, the start index passed to parameter 3 specifies the zero-based index from the end of the string of the character at which to begin searching in reverse.
    Parameter 8: An optional number in which the function stores the number of substrings that it replaced.
    Returns: The modified string.
    Scott Richardson
    National Instruments

  • Remote Object - not able to get the returned value from java method

         Hi ,
    I am developing one sample flex aplication that connects to the java code and displays the returned value from the
    java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
    lastResult is giving null .  I am able to see the sysout messages in server console.
    I am using flex 3.2 and blazeds server  and java 1.5
    Here is the code what I have written.
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
     <mx:Script><![CDATA[
    import mx.controls.Alert; 
    import mx.binding.utils.ChangeWatcher; 
    import mx.rpc.events.ResultEvent; 
    import mx.messaging.*; 
    import mx.messaging.channels.* 
    public function initApp():void { 
         var cs:ChannelSet = new ChannelSet(); 
         var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf");     cs.addChannel(customChannel);
         remoteObj.channelSet = cs;
    public function writeToConsole():void {      remoteObj.writeToConsole(
    "hello from Flash client");
          var returnedVal:String = remoteObj.setName().lastResult;     Alert.show(returnedVal);
    //[Bindable] 
    // private var returnedVal:String; 
    ]]>
    </mx:Script>
    <mx:RemoteObject id="remoteObj" destination="sro" /> 
    <mx:Form width="437" height="281">
     <mx:FormItem>  
    </mx:FormItem>  
    <mx:Button label="Write To Server Console" click="writeToConsole()"/>
     </mx:Form>
     </mx:WindowedApplication>
    Java code
    public  
         public SimpleRemoteObject(){  
              super();     }
      class SimpleRemoteObject { 
         public void writeToConsole(String msg) {          System.out.println("SimpleRemoteObject.write: " + msg);     }
         public String setName(){          System.
    out.println("Name changed in Java"); 
              return "Name changed in Java";
    And I have configured destination in  remote-config.xml
    <destination id="sro">
       <properties>    
        <source>SimpleRemoteObject</source>
        <scope>application</scope>
       </properties>
      </destination>
    Please help me .

    You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
    In this you define what you wish to do.
    More importantly in the remote object you need to define which method you wish to call using the method class like this
    <mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1"  >
         <Method name="javaMethodName" result="r2" fault="f2"/>
    <mx:RemoteObject>
    r2 is the function where you get the result back from java and can use it to send the alert.

  • How can I use comma in the return values of a static list of values

    Hi all,
    I want to create a select list (static LOV) like the following:
    Display Value / Return Value
    both are "Y" / 'YY'
    one is "Y" / 'YN','NY'
    I write the List of values definition is like this:
    STATIC:both are "Y"; 'YY',one is "Y";'YN', 'NY'
    However, it is explain by htmldb like this:
    Display Value / Return Value
    both are "Y" / 'YY'
    one is "Y" / 'YN'
    / 'NY'
    I tried using "\" before the ",", or using single or double quote, but all these do not work:(
    How can I use a comma in the return values?
    Thanks very much!

    "Better still, why not process the code of both Y with 2Y and one is Y with 1Y? "
    Could you please explain in detail? thanks! I am quite new to htmldb
    In fact I have a table which has too columns "a1" and "a2", both the values of these two columns are "Y" or "N". AndI want to choose the records that both a1 and a2 are "Y", or just one of a1, a2 is "Y".
    So I write the report sql like this:
    "select * from t1 where a1 || a2 in(:MYSELECTLIST) "
    Thus, I need to use "," in the LOV, since expression list in IN(,,,) using ",".
    Any other way to implement this?

Maybe you are looking for

  • HT1414 iphone 3gs still wont activate i have tried everything

    i have restored it i have changed the chip i have had it done at the apple store they said it will activate in a few days after apple usa had done something still nothing any ideas

  • Error when running dbms_metadata.get_ddl on different as logged in schema

    Hi , I am running 10gR2 and trying to export views from different schema as logged in by using dbms_metadata.get_ddl. Now I logged as user 'USER_01' and run query like : SELECT dbms_metadata.get_ddl('TABLE','MY_TABLE', 'USER_01') FROM DUAL; I get the

  • Can I use Bluetooth headphones on G72?

    I have a G72 with bluetoth. When I access the bluetooth menu it only offers me to use it for file transfer, not connecting a device like headphones. Am I screwed or is there a solution?

  • Terminating Q-in-Q on WS-C3750G-24TS-S1U

    Hello, we have a connection from a service provider between location A and B where in location A i have an ethernet port and i configure a switch interface as trunk with 802.1q encapsulation and i try to pass vlans 421-423. in location B the ethernet

  • Upgrading from ios 3.1.3  to ios 4.3

    i have an iphone 3gs running on ios 3.1.3. i want to upgrade to ios 4.3. will i lose all my data  such as songs, contacts, messages on my iphone? and if so, is there any way of doing this without losing data?