1 Reply Latest reply: Jun 26, 2013 6:04 AM by Frank Nimphius-Oracle RSS

    pass display value of lov to webservices

    Tshifhiwa

      hi how can i pass lov display value not code for example i select office pretoria and save pta in database but what to pass pretoria to webservices

      am in jdeveloper 11.1.1.6.0

      this is how i called webservices

      <methodAction id="approveOrganisation1" InstanceName="ApproveOrgAppTest"

                        DataControl="ApproveOrgAppTest" RequiresUpdateModel="true"

                        Action="invokeMethod" MethodName="approveOrganisation"

                        IsViewObjectMethod="false">

            <NamedData NDName="org_name"

                       NDValue="#{bindings.Organisationname.inputValue}"

                       NDType="java.lang.String"/>

            <NamedData NDName="regional_office"

                       NDValue="#{bindings.Officecode.attributeValues[0]}"

                       NDType="java.lang.String"/>

            <NamedData NDName="org_type"

                       NDValue="#{bindings.Organisationtypecode.attributeValues[0]}"

                       NDType="java.lang.String"/>

        • 1. Re: pass display value of lov to webservices
          Frank Nimphius-Oracle

          Hi,

           

          strange use of LOV. Anyway, see "Reading the selected value of an ADF bound Select List in Java" in http://www.oracle.com/technetwork/developer-tools/adf/learnmore/dec2010-otn-harvest-199274.pdf

          (its on page 5). Assuming the label comes from a model driven list source too, you can get it from here

           

          Access to the selected row

           

          Row selectedRow = (Row)list.getSelectedValue();

           

          grants you access to any attribute in this row. For your use case you use a managed bean property

           

          String label = null;

           

          public void setLabel(String s){};

          public String getLabel(){

            1. access the binding layer (existing knowledge you have)

            2. access the list binding (existing knowledge you have)

            3. determine the selected list row (as per the PDF document above)

            4. access row as per code snippet abve

            5. determine label attribute and get String

            6. return string

          }

           

          The managed bean property then is accessed from the method binding argument using EL

           

          Frank