How to read the selected value of a dropdown list box

Hello,
I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
I dont know how to trap the selection made on dropdown list.
PLease guide me on how to trap the dropdown list field selection value.
Thanks in advance.
Thirumala.

Hello,
Check what is done in standard for the fielf REGION which is inked to the country.
Otherwise, you can do the following :
- in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
- Put the new value in a global variable (GV).
- in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
Hope this will help you,
Regards,
Frederic

Similar Messages

  • Personas 2.0: How to catch the selection event of a dropdown list?

    Hi Personas 2.0 experts,
    The use case:
    I want to use a text field to show the "key" of an item that can be selected in a dropdown list.
    The issue:
    After clicking the list and selecting an item, the text field is not automatically updated with the newly selected item content.
    Anyone has an idea to how make such an auto update (pls note I don't want to use an extra button to do the update, just by clicking the list only)?
    Thx.
    Dong

    To display the key (the actual value) that's selected in a dropdown, there is a property called ShowKeys which you could set.
    However if you'd want to show the selected value in another field upon picking an option, this would require an event associated in Personas 2.0 with the selection of a dropdown value. This is currently not available so I'm afraid what you are looking for is not possible.
    Edit: It turns out I was wrong... there is an option (at least it's there in SP3) which allows linking a script button to the dropdown property OnValueChanged, so you can use this to do any script action you need when the user selects a value.
    (thanks, Sushant )
    Message was edited by: Tamas Hoznek

  • How do I read the selected value of a comboBox?

    I need to send the selected value of a comboBox in an HTTPService request. How do I read the selected value (not label or item or index) from the comboBox?

    > (not label or item or index)
    I suspect 'item' is what you need actually. Specifically the 'selectedItem' property which returns the whole of the selected object from your dataprovider. From that you can then extract the selected object's properties.
    e.g.  selectedValue = myComboBox.selectedItem.value;
    The example in tour-de-flex shows this - note:  'data' in that example is i think what you call 'value'.
    http://tourdeflex.adobe.com/flex4.0/ComboBox/sample.html  (right-click to view source)
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/suppor tClasses/ListBase.html#selectedItem
    hth
    Paul Evans
    http://www.creative-cognition.co.uk/
    http://blog.creacog.co.uk/

  • How to clear the selected values in the JCombobox

    Hi All,
    Can you please tell - how to clear the selected values in the JCombobox
    I have four dropdowns in my application, When I click "CLEAR" button, what ever the values selected in the four drop downs should go off and view as "SELECT" in all the dropdowns.

    In addition to the above you should also check out [Combo Box Prompt|http://www.camick.com/java/blog.html?name=combo-box-prompt] which makes it easy to display the default prompt.

  • How to get the selected value in SelectOneMenu in backing bean

    Hello all,
    I need your help. I want to have 2 select menus with the second menu's items list are populated based on the selection in the first menu. I don't know how to get the selected value in the backing bean so that I can based on that select menu to populate the second menu's item list. Basically I need to access to the UI Component of the first select Menu and retrieve its selected value.
    Could you help me out?
    Thank you very much in advance,
    Lngo

    Hi Lingo,
    There r two ways of getting the values into the list. First one is hardcoding the values and the second one is use the list and get the values into the list by firing a query in the database.
    Inorder to display the values in the second menu based on the first onces selection we need to add an attribute to the first selectonemenu known as valueChangeListener and we need to sumit the page.
    Here is the sample code
    <h:selectOneMenu id="catalogue"
                                  binding="#{urbean.catalogue}" onchange="submit()"
                                  valueChangeListener="#{urbean.categoryValueChange}"
                                  <f:selectItem itemLabel="Select Catalogue" itemValue="" />
                                  <f:selectItems value="#{urbean.catalogueList}" />
    </h:selectOneMenu>
    <h:selectOneMenu id="category"
                                  binding="#{urbean.category}">     <f:selectItem itemLabel="Select Category" itemValue="" />
                                  <f:selectItems value="#{urbean.categoryList}" />
                                  <                         </h:selectOneMenu>
    now in method called by valuechangelistener we need to write the similar code
    public void categoryValueChange(ValueChangeEvent event) {
    String rfnum = (String) event.getNewValue();
    List categoryList = new ArrayList();
    List tempList = new TablenameDAO().getActiveCatByCatalogueID(rfnum);
              for (int i = 0; i < tempList.size(); i++) {
                   Tablename tablename = (Tablename ) tempList.get(i);
                   String value = "" + tablename .getrfnum();
    String label = tablename .getname();
         if (label == null) {
                   label = "";
                   SelectItem item = new SelectItem(value, label);
                   categoryList.add(item);
              bean.setCategoryList(categoryList);
    ///getActiveCatByCatalogueID (rfnum) should bring the records which r based on the rfnum
    if u follow this process i am damsure that u will get the values in to the secondlist based upon the first list
    Thanks & Regards
    Manidhar

  • How to read the selected row value of a table node

    hi
    i have a node of table type, displaying few records & with each record a  NEXT button is there.
    now i want to read the values of the selected row of the table & want to process next with NEXT button.
    pls tell me how to read the values of the selected row only.
    reds.

    data : lo_nd type ref to if_wd_context_node,
      lo_nd1 type ref to if_wd_context_node,
      lt_temp type wdr_context_element_set,
      wa_temp type ref to if_wd_context_element,
      ls_node1 type sflight,
      lt_node1 type STANDARD TABLE OF sflight.
    lo_nd = wd_context->get_child_node('CN_MAIN').
      CALL METHOD lo_nd->get_selected_elements
       RECEIVING
           set = lt_temp.
      loop at lt_temp INTO wa_temp.
          CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_node1.
        APPEND ls_node1 TO lt_node1.
        CLEAR ls_node1.
      ENDLOOP.
    'CN_MAIN' is the node whose selected values are to be picked and stored in internal table lt_node1.
    Other option by Thomas :
    DATA lo_nd_cn_main TYPE REF TO if_wd_context_node.
      DATA lt_temp TYPE wdr_context_element_set.
      FIELD-SYMBOLS <wa_temp> LIKE LINE OF lt_temp.
      DATA lt_node1 TYPE wd_this->elements_cn_main.
      FIELD-SYMBOLS <ls_node1> LIKE LINE OF lt_node1.
      lo_nd_cn_main = wd_context->get_child_node( name = wd_this->wdctx_cn_main ).
      lt_temp = lo_nd_cn_main->get_selected_elements( ).
      LOOP AT lt_temp ASSIGNING <wa_temp>.
        APPEND INITIAL LINE TO lt_node1 ASSIGNING <ls_node1>.
        <wa_temp>->get_static_attributes( IMPORTING STATIC_ATTRIBUTES = <ls_node1> ).
      ENDLOOP.

  • How to get the selected values from multiselected list

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

  • How to get the selected values from the shuttle

    Hi
    Please tell me how to get the selected option values from the shuttle leading list.
    Thanks

    you can also obtain the option values present in the leading and trailing lists using the
    following methods:
    public String[] getLeadingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)
    public String[] getTrailingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)For example, the following code sample returns an array of values in the trailing list, ordered according to the
    order in which they appear in the list:
    String[] trailingItems =
    shuttle.getTrailingListOptionValues(pageContext, shuttle);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to get the selected values from a selectmanylistbox?

    Hi ADF Experts,
    <af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb2"
                            value="#{viewScope.TestBean.lovValue}"
                      autoSubmit="true"      valuePassThru="true">
        <f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
                       binding="#{viewScope.TestBean.selectedItems}"/>
      </af:selectManyListbox>
      <af:commandButton text="get selected values" id="cb3"
                        actionListener="#{viewScope.TestBean.getSelectedValues}"
                        partialSubmit="true"/>
      private List<String> lovValue;
      private List<SelectItem> actualList;
    //getters and setters
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
        for (String selectedItem : lovValue) {
            System.out.println("Selected item: " +selectedItem.); // this is giving 1 and 3 like this. how to get the checked values as I'm getting only the indexes. In this scenario I am populating the list programmatically.Just I wanted to know how can we get the selected values(not indexes). Please suggest.
    Thanks-
    Abhijit

    Hi Timo,
    As I am sharing the page fragment and the Java class. So its my usecase I have mentioned below
    I am sharing the jsff page fragment and java class. So that it wud be of help to others.
    jsff page fragment
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core">
            <af:panelGroupLayout id="pgl1">
              <af:commandButton text="Search"  id="cb1"
                                actionListener="#{viewScope.TestBean.searchSupplier}"/>
    </af:panelGroupLayout>
        <af:popup id="p1" binding="#{viewScope.TestBean.searchSupplierPopup}">
              <af:dialog id="d2"
                         type="none">
               <af:table value="#{bindings.Contacts.collectionModel}" var="row"
                      rows="#{bindings.Contacts.rangeSize}"
                      emptyText="#{bindings.Contacts.viewable ? 'No data to display.' : 'Access Denied.'}"
                      fetchSize="#{bindings.Contacts.rangeSize}"
                      rowBandingInterval="0"
                      binding="#{viewScope.TestBean.tsupportIssues}"
                      filterModel="#{bindings.ContactsQuery.queryDescriptor}"
                      queryListener="#{bindings.ContactsQuery.processQuery}"
                      filterVisible="true" varStatus="vs"
                      selectionListener="#{bindings.Contacts.collectionModel.makeCurrent}"
                      rowSelection="multiple" id="t1">
              <af:column sortProperty="name" filterable="true" sortable="true"
                         headerText="#{bindings.Contacts.hints.name.label}" id="c2">
                <af:outputText value="#{row.name}" id="ot1"/>
              </af:column>
              <af:column sortProperty="email" filterable="true" sortable="true"
                         headerText="#{bindings.Contacts.hints.email.label}"
                         id="c1">
                <af:outputText value="#{row.email}" id="ot2"/>
              </af:column>
            </af:table>
          <af:commandButton text="OK" id="cb5" partialSubmit="true"       actionListener="#{viewScope.TestBean.testMethod}"/>
          <af:commandButton text="Cancel" id="cb6"
                            actionListener="#{viewScope.TestBean.cancelPopupSearch}"/>
        </af:dialog>
            </af:popup>
      <af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb5"
                            value="#{viewScope.TestBean.lovValue}"
                      autoSubmit="true"      valuePassThru="true"
                            binding="#{viewScope.TestBean.prp1}">
        <f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
                       binding="#{viewScope.TestBean.selectedItems}"/>
      </af:selectManyListbox>
      <af:commandButton text="get selected values" id="cb3"
                        actionListener="#{viewScope.TestBean.getSelectedValues}"
                        partialSubmit="true"/>
      <af:commandButton text="remove selected" id="cb4"
             partialSubmit="true"           actionListener="#{viewScope.TestBean.removeSelectedValues}"/>
    </jsp:root>
    TestBean.java
    package com.demo.view;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.faces.component.UISelectItems;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    public class TestBean {
      private RichTable tsupportIssues;
      private List<SelectItem> lovValue;
      private List<SelectItem> actualList;
      private RichSelectManyListbox prp1;
      private List valuesChoosed = new ArrayList();
      private UISelectItems selectedItems;
      private RichPopup searchSupplierPopup;
        public TestBean() {
        super();
      public void setTsupportIssues(RichTable tsupportIssues) {
        this.tsupportIssues = tsupportIssues;
      public RichTable getTsupportIssues() {
        return tsupportIssues;
      public void testMethod(ActionEvent actionEvent) {
        // Add event code here...
        // For learning purposes - show Select Many Button clicked 
         System.out.println("Select Many Button has been Clicked");
        // // RowKeySet Object can hold the selected rows from a user as follows    
        RowKeySet rksSelectedRows =         this.getTsupportIssues().getSelectedRowKeys();
        // Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows 
        Iterator itrSelectedRows = rksSelectedRows.iterator();  
        // Get the data control that is bound to the table - e.g.
        // OpenSupportItemsIterator    
        DCBindingContainer bindings =         (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); 
        DCIteratorBinding dcIteratorBindings =         bindings.findIteratorBinding("findAllContactsIterator"); 
        // Information from binding that is specific to the rows  
        RowSetIterator rsiSelectedRows =         dcIteratorBindings.getRowSetIterator();   
        // Loop through selected rows  
        int i=1;
        while (itrSelectedRows.hasNext()) {        
          // Get key for selected row    
          Key key = (Key)((List)itrSelectedRows.next()).get(0);  
          // Use the key to get the data from the above binding that is related to the row      
          Row myRow = rsiSelectedRows.getRow(key);         
          // Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces       
          System.out.println(myRow.getAttribute("name"));
          valuesChoosed.add(myRow.getAttribute("name"));
    //        actualList = new ArrayList<SelectItem>();
    //        String j = Integer.toString(i);
    //        actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
    //      i++;
           searchSupplierPopup.hide();
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setLovValue(List<SelectItem> lovValue) {
        this.lovValue = lovValue;
      public List<SelectItem> getLovValue() {
        return lovValue;
      public void setActualList(List<SelectItem> actualList) {
        this.actualList = actualList;
      public List<SelectItem> getActualList() {
        actualList = new ArrayList<SelectItem>();
        if(valuesChoosed.size()!=0){
        for(int i=0;i<valuesChoosed.size();i++){
          actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
        else{
          actualList.add(new SelectItem("1","Select One"));
        return actualList;
      public void setPrp1(RichSelectManyListbox prp1) {
        this.prp1 = prp1;
      public RichSelectManyListbox getPrp1() {
        return prp1;
      public void setValuesChoosed(List valuesChoosed) {
        this.valuesChoosed = valuesChoosed;
      public List getValuesChoosed() {
        return valuesChoosed;
      public void getValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<valuesChoosed.size();i++){
          System.out.println(valuesChoosed.get(i));
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
         for(int i=0;i<this.getLovValue().size();i++){
             System.out.println("Selected Value:"+this.getLovValue().get(i));
      public void removeSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
      public void setSelectedItems(UISelectItems selectedItems) {
        this.selectedItems = selectedItems;
      public UISelectItems getSelectedItems() {
        return selectedItems;
        public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
            this.searchSupplierPopup = searchSupplierPopup;
        public RichPopup getSearchSupplierPopup() {
            return searchSupplierPopup;
        public void cancelPopupSearch(ActionEvent actionEvent) {
            // Add event code here...
            searchSupplierPopup.hide();
        public void searchSupplier(ActionEvent actionEvent) {
            // Add event code here...
            RichPopup.PopupHints hints = new RichPopup.PopupHints();
            searchSupplierPopup.show(hints);
    package com.demo.view;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.faces.component.UISelectItems;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    public class TestBean {
      private RichTable tsupportIssues;
      private List<SelectItem> lovValue;
      private List<SelectItem> actualList;
      private RichSelectManyListbox prp1;
      private List valuesChoosed = new ArrayList();
      private UISelectItems selectedItems;
      private RichPopup searchSupplierPopup;
        public TestBean() {
        super();
      public void setTsupportIssues(RichTable tsupportIssues) {
        this.tsupportIssues = tsupportIssues;
      public RichTable getTsupportIssues() {
        return tsupportIssues;
      public void testMethod(ActionEvent actionEvent) {
        // Add event code here...
        // For learning purposes - show Select Many Button clicked 
         System.out.println("Select Many Button has been Clicked");
        // // RowKeySet Object can hold the selected rows from a user as follows    
        RowKeySet rksSelectedRows =         this.getTsupportIssues().getSelectedRowKeys();
        // Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows 
        Iterator itrSelectedRows = rksSelectedRows.iterator();  
        // Get the data control that is bound to the table - e.g.
        // OpenSupportItemsIterator    
        DCBindingContainer bindings =         (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); 
        DCIteratorBinding dcIteratorBindings =         bindings.findIteratorBinding("findAllContactsIterator"); 
        // Information from binding that is specific to the rows  
        RowSetIterator rsiSelectedRows =         dcIteratorBindings.getRowSetIterator();   
        // Loop through selected rows  
        int i=1;
        while (itrSelectedRows.hasNext()) {        
          // Get key for selected row    
          Key key = (Key)((List)itrSelectedRows.next()).get(0);  
          // Use the key to get the data from the above binding that is related to the row      
          Row myRow = rsiSelectedRows.getRow(key);         
          // Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces       
          System.out.println(myRow.getAttribute("name"));
          valuesChoosed.add(myRow.getAttribute("name"));
    //        actualList = new ArrayList<SelectItem>();
    //        String j = Integer.toString(i);
    //        actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
    //      i++;
           searchSupplierPopup.hide();
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setLovValue(List<SelectItem> lovValue) {
        this.lovValue = lovValue;
      public List<SelectItem> getLovValue() {
        return lovValue;
      public void setActualList(List<SelectItem> actualList) {
        this.actualList = actualList;
      public List<SelectItem> getActualList() {
        actualList = new ArrayList<SelectItem>();
        if(valuesChoosed.size()!=0){
        for(int i=0;i<valuesChoosed.size();i++){
          actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
        else{
          actualList.add(new SelectItem("1","Select One"));
        return actualList;
      public void setPrp1(RichSelectManyListbox prp1) {
        this.prp1 = prp1;
      public RichSelectManyListbox getPrp1() {
        return prp1;
      public void setValuesChoosed(List valuesChoosed) {
        this.valuesChoosed = valuesChoosed;
      public List getValuesChoosed() {
        return valuesChoosed;
      public void getValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<valuesChoosed.size();i++){
          System.out.println(valuesChoosed.get(i));
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
         for(int i=0;i<this.getLovValue().size();i++){
             System.out.println("Selected Value:"+this.getLovValue().get(i));
      public void removeSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<this.getLovValue().size();i++){
            System.out.println("Selected Value:"+this.getLovValue().get(i));
            System.out.println(this.getLovValue().remove(i));
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setSelectedItems(UISelectItems selectedItems) {
        this.selectedItems = selectedItems;
      public UISelectItems getSelectedItems() {
        return selectedItems;
        public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
            this.searchSupplierPopup = searchSupplierPopup;
        public RichPopup getSearchSupplierPopup() {
            return searchSupplierPopup;
        public void cancelPopupSearch(ActionEvent actionEvent) {
            // Add event code here...
            searchSupplierPopup.hide();
        public void searchSupplier(ActionEvent actionEvent) {
            // Add event code here...
            RichPopup.PopupHints hints = new RichPopup.PopupHints();
            searchSupplierPopup.show(hints);
    Thanks,
    A. Abhijit

  • How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g

    Hi Every One,
    Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
    Thanks

    shuttle's valuechangeevent would fire when you shuttle items back and forth.
        public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
            ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
            if (list != null){
                for (int i=0; i<list.size(); i++) {
                    int l = list.size()-1;
                    val = list.get(l).toString(); //returns , delimited string
                    if (val != null){
                        val = val.replaceAll("[\\[\\]]", "");
                        StringTokenizer st = new StringTokenizer (val, ",");
                        int nto = st.countTokens ();
                        for (int j = 0; j < nto; j++)
                            String token = st.nextToken ();                     
                ..........

  • How to capture the selected values from module pool dialog list box !

    Hi experts,
    Can anyone help me out in capturing the values from the list box.
    i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
    I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
    Your inputs are appreciated.
    Thanks,
    Vijay.

    Along with the PBO and PAI event, add a POV event in the flow logic of the screen
    DEMO_DROPDOWN_LIST_BOX -is a good demo example.
    PROCESS ON VALUE-REQUEST.
    FIELD structure_name-field_name MODULE create_dropdown_box.
    In the report :
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    sdyb_conn-carrid will contain your selected field

  • How to get the selected value/key of a drop down list box in webdynpro Java

    Dear SDN Members,
    I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
    Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
    Can any one put here the code part relating to this.
    Your help will be awarded.
    Thanks in advance,
    Regards,
    Sireesha.B

    Hi Sireesha,
        You want to display value based on the key selected in dropdown list. If you want to do like that
    1) Create a context attribute for ex: key_value
    2)In the properties of the attribute select the calculated as true.
    3)It will create getter and setter methods for your attribute.
    4)Go to implementation add the following code in getter method of your attribute
    String attributeName = IPrivateCreate.IContextElement.KEY;
    //KEY is your dropdown key attribute not the value attribute.
    IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
    ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
    Object key = element.getAttributeAsText(attributeName);
    return valueset.getText(key);
    Regards
    Suresh

  • How to capture the selected values of the filter?

    Hi Everybody
    I have created a dashboard using a 4 column filter. It all works well - no problem.
    I now need to enhance the functionality of the dashboard which needs the selected values of each of the parameters of the filter. As far as I know, the selections of the fiilter columns are not "Inserted In" any cell, only the data values of the corresponding row not including the filter columns are inserted in the "Inserted In" row, is there a way to capture the values of the filter column selections in some cells on the spreadsheet?
    An early response from you all shall be highly valued.
    Also, does anyone know which is the current equivalent version of Xcelsius to the old Xcelsius Workgroup version. This Xcelsius Workgroup version supported the "XML Integration Dynamic Refresh" wherein you didn't have to reinserted the updated Excel spreadsheet into Xcelsius have an updated dashboard - as long as the corresponding XML files were updated with the latest data, the exported dashboard would refresh.
    Best regards
    Deepak Agarwal

    Along with the PBO and PAI event, add a POV event in the flow logic of the screen
    DEMO_DROPDOWN_LIST_BOX -is a good demo example.
    PROCESS ON VALUE-REQUEST.
    FIELD structure_name-field_name MODULE create_dropdown_box.
    In the report :
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    sdyb_conn-carrid will contain your selected field

  • How to read the tag values sent by PCo to MII transaction

    Hi everybody,
    I have an Agent created inside PCo and its listening to a data server. I have also created a notification object which triggers my MII Transaction (after certain condition is getting fulfilled).
    Now, I want to pass certain values from PCo to MII using the notification object. For this I have tried 2 options:
    1. I defined one input parameter in transaction of type 'XML'. But this did not work. When I used 'Tracer' to check the received values, it showed empty.
    2. Since XML variable did not work, I tried with 'String' variable. It worked but the entire input data was in 'String' format.
    Actually I used XML_Saver to save the string and given filename as '.xml'. When I opened that xml file, it was looking like this:
    <<unable to write XML here>>
    Considering the above 2nd option, how can I extract the particular 'Tag' values from XML string. Since the string is not in the format of 'Rowset/Row/Row', I cannot specifically assign/map those tag values to any other variable inside MII transaction.
    ===========

    Hi, I was trying to post the xml string. It was not possible yesterday (because, SDN editor has converted xml part into some irregular string).
    Now, I am trying to post the string by removing the special characters. Please try to understand it.
    Now, my question is how to retrieve the CDATA value 5599999999 using xpath. Please help.
    NotificationMessage
    Body
    Values
    Expression1 type xsd string
    CDATA 5599999999
      /Expression1
      /Values
      /Body
      Faults /
      /NotificationMessage

  • In NodeList how to read the ERRTAB values

    How to Read the NodeList ? I have an error table it has Type and message fields....
    NodeList list = document.getElementsByTagName("ERRTAB");

    I assume you are using XML DOM inside Java mapping. Once you got the Nodelist object initialised, get the length of the node list and run in a for loop for each Node that it has.
    VJ

Maybe you are looking for