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

Similar Messages

  • 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 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 ADF select many shuttle to textfield

    Hi All
    Actually in my webpage, I am using text field and beside that placing the command button. When user clicks the command button, a popup window will open up with the "af:select many shuttle" component. While popup opens, it fetch the values backend and displays it to the user in left side of the component. When user selects few values to the right side of the component and clicks ok. Those selected values should be displayed in the besides inputtext field.
    Code in Webpage:
    <af:inputText id="disciplineVariable"
    contentStyle="width:200px;"
    styleClass="AFDefaultBoldFont;AFLabelTextForeground;AFDarkForeground;"
    value="#{ADFStandards.input}"/>
    <af:commandImageLink id="cb12" icon="/compliance/images/List.PNG" hoverIcon="/compliance/images/HoverList.PNG">
    <af:clientListener type="action" method="disciplinePopupMethod"/>
    </af:commandImageLink>
    PopUp code:
    <af:popup id="testingPopUP" contentDelivery="lazyUncached">
    <af:dialog title="TestingPOPUP" dialogListener="#{testBean.testingValues}">
    <af:selectManyShuttle id="sms1" valueChangeListener="#{testBean.testingPopUP}">
    <f:selectItems value="#{ADFStandards.mostCommonStandards}" id="si1"/>
    </af:selectManyShuttle>
    </af:dialog>
    </af:popup>
    Could anyone please help me in this.
    Regards
    Venkat.S

    Bind your value attribute for af:selectManyShuttle to the List property in ManagedBean. When the User finish the selection, in your MB set the attribute List in input string attribute (probably what you want is iterate over the list, and concatenate on the String). After that, you have to partialTriggers on the inputText component in order to refresh.
    Regards,

  • 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 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 get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • How to get the Node Value from XmlValue result?

    Hi ,
    I am not able to get the Node Value from the result. In my XQuery im selecting till a Node, if i change my query as
    collection('PhoneBook')/phone_book/contact_person/address/string()", qc);
    im getting the node value, but here the problem is its not a Node so i cannot get the Node name.
    So how can i get the Node Name and Node value together?
    any help please ????
    XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <phone_book>
    <contact_person>
    <name>
    <first_name>Michael</first_name>
    <second_name>Harrison</second_name>
    </name>
    <address city="yyyyy" pincode="600017" state="xxxxx">
    176 Ganesan street, Janakinagar, alwarthirunagar
    </address>
    </contact_person>
    <phone_number type="mobile">9881952233</phone_number>
    <phone_number type="home">044-24861311</phone_number>
    <phone_number type="office">080-12651174</phone_number>
    </phone_book>
    Code:
    XmlQueryContext qc = manager.createQueryContext();
    XmlResults rs = manager.query
    ("collection('PhoneBook')/phone_book/contact_person/address", qc);
    while(rs.hasNext()){
    XmlValue val = rs.next();
    System.out.println(val.getNodeName() + " = [ " + val.getNodeValue() + " ] ");
    Output
    address = [  ]

    You are right, this seemed un-intuitive to me too, but I finally understood how it's done.
    The "value" of a node is actually the total amount of text that is not contained in any of the node's child nodes (if any). So a node with child nodes can still have text value.
    To get the 'value' of an element node, you must therefore concatenate the values of all children of type "XmlValue::TEXT_NODE", of that node. Try it.
    In your example, the <address> node has no child elements, my guess is that BDB XML stores the address string "176 Ganesan street, Janakinagar, alwarthirunagar" inside a child node of <address> node (of type XmlValue::TEXT_NODE) because you wrote the string on a separate line.

  • How to get the selected entry from a Dropdown (using IF_WD_SELECT_OPTIONS)

    Hello,
    I created a Selection screen by adding attribute M_HANDLER of type IF_WD_SELECT_OPTIONS.
    This way I can create a selection screen with normal select-options.
    Now I added a parameter for a dropdown list. The Value set is passed correctly. No problem there. The values are filled and diplayed correctly.
    * add the SHIP-TO field to the selection
      DATA: ltp_text  TYPE string.
      DATA: lta_ship_to_table type WDY_KEY_VALUE_table,
            lwa_ship_to       like LINE OF lta_ship_to_table.
      DATA: context_node_ship_to_table TYPE REF TO if_wd_context_node.
    * get all declared attributes
      context_node_ship_to_table = wd_context->get_child_node( 'SHIP_TO_TABLE' ).
      context_node_ship_to_table->get_static_attributes_table(
        IMPORTING
          table  = lta_ship_to_table ).
      ltp_text = wd_assist->if_wd_component_assistance~get_text( 'L01' ).
      wd_this->m_handler_dlv->add_parameter_field(
                             i_id           = 'KUNWE'
                             i_description  = ltp_text
                             i_as_dropdown  = 'X'
                             it_value_set   = lta_ship_to_table
                             i_within_block = 'BLK1' ).
    The problem is to GET the selected value in the method that is called after clicking on the Search button.
    I tried using several methods, for example GET_PARAMETER_FIELD and GET_SELECTION_SCREEN_ITEMS.
    * Get the Ship-to
      DATA: ltp_kunwe       TYPE REF TO data.
      ltp_kunwe = wd_this->m_handler_dlv->get_value_of_parameter_field(
                                            i_id = 'KUNWE' ).
    * Assign it to a field symbol
      ASSIGN ltp_kunwe->* TO <fs_kunwe>.
    Result was INITIAL.
    DATA: lrf_get_selection_screen_items TYPE if_wd_select_options=>tt_selection_screen_item.
      wd_this->m_handler_dlv->get_selection_screen_items(
                  IMPORTING
                     et_selection_screen_items = lrf_get_selection_screen_items ).
    Result was INITIAL, although the table was retrieved with all values.
    wd_this->m_handler_dlv->get_parameter_field(
                                          EXPORTING
                                            i_id = 'KUNWE'
                                          IMPORTING
                                            e_value = ltp_kunwe ).
    Also INITIAL.
    It looks like I am missing a step (maybe to set lead selection for this field). What did I miss?
    How can I get to the value?

    Thanks!
    Problem solved:
    DATA: lr_value             TYPE REF TO data.
    CREATE DATA lr_value TYPE string.                     "<----  I was missing this code
      LOOP AT lta_ship_to_table INTO lwa_ship_to.
        value_set-key   = lwa_ship_to-key.
        value_set-value = lwa_ship_to-value.
    *    INSERT value_set INTO TABLE lt_value_set.
        append value_set TO lt_value_set.
      ENDLOOP.
      ltp_text = wd_assist->if_wd_component_assistance~get_text( 'L01' ).
      wd_this->m_handler_dlv->add_parameter_field(
                              i_description  = ltp_text
                              i_id           = 'KUNWE'
                              i_value        = lr_value   "<----  I was missing this code
                              i_as_dropdown  = abap_true
                              it_value_set   = lt_value_set
                              i_within_block = 'BLK1' ).
    I looked at that parameter, but thought is was only used to SET the value, not required to get it back as well. Because it IS an import parameter...

  • 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

  • Need to get the selected values from the selectManyShuttle

    Hi,
    I am using ADF11g newer version.
    I have a selectManyShuttle and a command button. Need to insert all the selected values on the right hand side of the selectManyShuttle into a database table.
    I created the selectManyShuttle with the values. Need help in getting the values on the right hand side.
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    Any sample code or link is really appreicated.
    Thanks

    Thanks for the reply.
    I am using a View Object and I dropped it as SelectManyShuttle
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2"
    valueChangeListener="#{POBacking.getSelectedValues}"
    valuePassThru="true"
    autoSubmit="true">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    public void getSelectedValues(ValueChangeEvent valueChangeEvent) {
    System.out.println("Testing Shuttle");
    ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    String val = "";
    String sqlStmt = "";
    try {
    if (list != null) {
    for (int i = 0; i < list.size(); i++) {
    int l = list.size() - 1;
    val = list.get(l).toString(); //returns , delimited string
    System.out.println(" value:" + val);
    if (val != null) {
    val = val.replaceAll("[\\[\\]]", ""); //remove []
    StringTokenizer st = new StringTokenizer(val, ",");
    int nto = st.countTokens();
    for (int j = 0; j < nto; j++) {
    String users = st.nextToken().trim();
    System.out.println("Users:" + users);
    //sqlStmt = " update xxpp_project_clip set clip_status='true', clip_seq = "+j * 10+
    // " where project_id = "+rHdr.getAttribute("ProjectId") +
    // " and clip_name ='"+ clip_Name +"'";
    //System.out.println("sqlStmt:" + sqlStmt);
    //stmt.executeUpdate(sqlStmt);
    //am.getDBTransaction().commit();
    //if (stmt != null)
    // stmt.close();
    // am.getDBTransaction().commit();
    } catch (Exception ex) {
    ex.printStackTrace();
    I don't see the values in the list.
    I gets printed as
    value:[Ljava.lang.Integer;@1b10691
    Users:Ljava.lang.Integer;@1b10691
    how to get the individual values in the list?
    Thanks
    Saru

  • HOW TO GET THE SELECTED VALUE IN A ROW FROM ONE VIEW TO ANOTHER VIEW?

    hi all,
    I  have a small issue.
    i have created two views.In the table of the first view i'm selecting a row and pressing the button it will move to next view.
    i am adding some fields manually in the table of the second view and pressing the save button.Here all the values should get updated corresponding to the field which i have selected in the first view.
    I want to know how to get the particular field in the selected row from one view to another view.
    Kindly help me.

    Hi,
            Any data sharing accross views can be achiveved by defining CONTEXT data in COMPONENT CONTROLLER and mapping it to the CONTEXT of all the views. Follow the below steps.
    1. Define a CONTEXT NODE in component controller
    2. Define same CONTEXT NODE in all the views where this has to be accessed & changed.
    3. Go to CONTEXT NODE of each view, right click on the node and choose DEFINE MAPPING.
    This is how you map CONTEXT NODE and same can be accessed/changed from any VIEW or even from COMPONENT CONTROLLER. Any change happens at one VIEW will be automatically available in others.
    Check the below link for more info regarding same.
    [http://help.sap.com/saphelp_nw04s/helpdata/EN/48/444941db42f423e10000000a155106/content.htm]
    Regards,
    Manne.

  • How to get the query values from the url in a servlet and pass them to jsp

    ok..this is the situation...
    all applications are routed through a login page...
    so if we have a url like www.abc.com/appA/login?param1=A&param2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
    so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanks

    ok..this is the situation...Sounds like you have a bad design on your hands.
    You're going to send passwords in a GET request as clear text? Nice security there.
    Why not start with basic security and work your way up?
    %

  • How to get the column values from a BC4J View Table in UIXML?

    I am using a default UiXML Application for Order Entry system with Orders & Order Lines & Customers. I have a uix file OrdersView1_View.uix which displays (no updateable columns) all the Orders. How do I get the column value of a selected row in a BC4J Table (example:OrdersId) when a Submit button is pressed using UIXML or Java Classes?
    I appreciate any help on this.

    Hi,
    You need to use keyStamp, an example:
    <bc4j table name="orders">
    <bc4j:keyStamp>
    <bc4j:rowKey name="key" />
    </bc4j:keyStamp>
    Furthermore, you can automatically send the selected row key using the go event handler, so in the handlers section you could send the key to an orderInfo page:
    <event name="show">
    <!-- forward to the update page, passing
    the selected key as a page property -->
    <ctrl:go name="orderInfo" redirect="true">
    <ctrl:property name="key">
    <ctrl:selection name="orders" key="key" />
    </ctrl:property>
    </ctrl:go>
    </event>

  • How to get the selected items from listbox

    Regarding listbox i have two questions
    1) I want to get the selected items as per the order in which ihave selected.Presently i'm getting in the ascending order.For example after selcting the 1,2,6 if i select 3 then its giving 1,2,3,6.But i want it in the order 1,2,6,3
    2)I want to select items from a single list box to many other listboxes.(ie) my first selection should goto first,second one to the second listbox and like this.How should i write the logic.
    please give me a suggestion.

    In order to have the selected items line up in accordance to the selection order, please do it one at a time. (That's the limit for that VI)
    If you need more than that (i.e. to regconize which item clicked first and which one comes later), you may have to figure it out ya
    Wish you good luck. Perhaps, someone else has a already made vi.
    Cheers!
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com

Maybe you are looking for

  • Regarding object_id in Oracle

    I have created a table TEMP_TAB and created 3 triggers on TEMP_TAB table. Triggers names are trig1, trig2 and trig3. Now when I query in dba_objects, I found below object_id for respective triggers. trig1 object id is 374841 trig2 object id is 374857

  • How to Integrate new material group into COPA planning KEPM

    Hi Sap Guru's Please help me in Integrate new material group into planning The planning coordinator is informed that a new material group is to be marketed in the coming year and that this new material group should be included in planning. To generat

  • XSL Mapping Problem

    Hi, I'm not familiar with XSL mapping for XI, and currently, it is needed in a project. The problem is there are some fields that are not mapped correctly so I have to modify the XSL. I was able to map it somehow using the existing XSL as basis, but

  • An error occurred while installation of ERP 6.0 Ehp 6.0 on Sybase ASE 15.7.0.

    Hi All I am installing SAP IDES Ehp 6 on SYBASE_ASE_15.7.0.50 and facing an error as follows:        An error occurred while processing option Enhancement Package 6 for SAP ERP 6.0 > SAP Application Server ABAP > Sybase ASE > Central System > Central

  • Small MacBook Pro screen scratch: Are they normal for a 2+ year old computer?

    Hello, I am writing about a topic that may have been mentioned around on these forums multiple times, scratches on the MacBook Pro screen display. In August 2010, I bought my 2010 MacBook Pro and since then I have been very careful with the screen by