Displaying multiselect select items row-wise

Hello ,
I have a multiselect item where the user can select multiple items . I want to display the selected items in the next page - one value at a time .
example :- if the user selects a, b, c from multiselect item i want to display in the next page as
a
b
c
what i am getting is a b c in the next page when i display the value of the item &<item_nam>.
how to display the selected multiselect items one below the other ?
thanks

Hi,
One way is
Create PL/SQL Dynamic Content and enter to region source something like
DECLARE
  l_arr APEX_APPLICATION_GLOBAL.VC_ARR2;
BEGIN
  htp.ulistOpen;
  l_arr := APEX_UTIL.STRING_TO_TABLE(:P51_EMP);
  FOR i IN 1 .. l_arr.count
  LOOP
    htp.listItem(l_arr(i));
  END LOOP;
  htp.ulistClose;
END;Change P51_EMP to your multiselect item name
Sample here
http://apex.oracle.com/pls/otn/f?p=40323:51
Br,Jari

Similar Messages

  • How to display the data in row wise in smartform

    Hi,
        I have to make a modification a smartform of poprinting and i want to display the row wise . At present it is displaying the  
        column wise. Actually there is a text which i want to display the data row wise.
        It is possible to display the data in row wise of the text .
    Edited by: nav009 on Oct 8, 2009 10:39 AM

    Hello ,
    I  assume that your requiremen is related to smartform.the below is the solution i suggest.
    As per my understanding of your requirement ,It's clear that as of now there is some description field which is also getting displayed along with other PO fields.
    However you would like to display the description field in a new line since the length of this field is longer than other fields as a result the data is getting scattered .
    Therefore one better option could be: since the whole data from PO would be in a loop you can display all other fields in one line type of the table as per the intial requirement and you display the description line alone in a new line type wth the desired length so that data would not be scattered and no data loss would happen.
    I assume you are aware of creating of line types for table.
    Thanks
    M.Naveen.

  • ALV: multiselect selects more rows than expected

    If I have table with many pages of data and do following actions:
    1) leave lead select in first page as it is
    2) go to next page - with ctrl select 2nd row
    3) go to next page - with ctrl select 1st row
    4) go back to previous page - 2nd row selected as expected
    5) go to next (3rd) page - 1st and 2nd row is selected (expected only 1st row to be selected)
    There is no any select event handler which could cause such behavior.
    I have noticed such error on standard table, too.
    What is causing this error?

    Oskars,
    If you are using
    -- one context node for this table,
    -- you have set the context node's Cardinality to o...n,
    -- and the table UI element that's bind to this context node's property SelectionMode is set to be 'auto' or 'multi',
    then I think this is a bug in your version.  I have tried on my system (SAP ECC 6.0, SAP_ABA 700), and I cannot reproduce the behavior you have describe in this thread.   Check the CSN to confirm if this is a bug indeed.
    regards,
    Tina Yang

  • How to print selected Item rows in AR Invoice under PLD?

    Hi,
    Customer is running on 2007A PL30. They are distributing drugs to clinics and hospital.
    Eg. In AR Invoice, they are selling 10 items to customer. The 10 items will be printed out in AR Invoice. Assume out of these 10 items 2 of it are poison.
    Customer wants to print out poison report to the government for same invoice but only appear 2 items rather than all the 10 items.
    May I know how to incorporate filtering in PLD to print out the 2 item only. FYI, we are going to use a marker in Item Master Data to indicate whether the item is poisoneous.
    How to derive poison report in this scenario?
    Regards
    Thomas

    Hi
    It will be possible to filter the rows (poison only) to show on a separate layout using the flag on the item master.
    You will need the flag field in the repetitive area as well as a formula field. You link your fields in the repetitive area to this formula field to determine whether a line in the invoice will show in the print or not.
    Have a look at the system layout 'Invoice_Item Type and Details (system)' - repetitve area which will give you a good idea of how this can be done.
    Regards

  • Combox Box not displaying selected item

    Below is the code I'm using to try to capture and display the
    selected item from a ComboBox:
    private function
    changeProjectTypeSelection(event:Event):void{
    projectTypeChange.text+=event.currentTarget.selectedItem.cboProjectType
    + " " +
    event.currentTarget.selectedIndex + "\n";
    Then the ComboBox:
    <mx:ComboBox fontSize="12" x="93" y="83" width="110"
    id="cboProjectType" dataProvider="{projectTypeArray}"
    labelField="projectTypeName" selectedIndex="0"
    click="changeProjectTypeSelection(event)"></mx:ComboBox>
    Then the TextInput:
    <mx:TextInput id="projectTypeChange" x="248.95" y="84"
    width="121"/>
    I know there's something wrong with the Actionscript code...
    just haven't figured it out. Any suggestions would be greatly
    appreciated!

    I've almost got it...
    private function
    changeProjectTypeSelection(event:Event):void{
    var i:int;
    for(i=0;i<projectTypeArray.length;i++){
    if(projectTypeArray.getItemAt(i).projectTypeName ==
    event.currentTarget.selectedItem.projectTypeName){
    projectTypeChange.text+=projectTypeArray.getItemAt(i).projectTypeName
    + "\n";
    Alert.show(projectTypeArray.getItemAt(i).projectTypeName +
    "FirstAlert");
    //Alert.show(event.currentTarget.selectedItem.projectTypeName +
    "SecondAlert");
    I just can't seem to be able to reset the value in the
    textInput field. I've tried setting it equal to spaces in several
    places, but it won't change after the first selection. Any ideas?
    Thanks for any suggestions!

  • Display selected items in dynamic list box

    I need to display the selected items in a dynamic list box -
    this worked great - but now client wants multiple selected. I do
    have the items comma delimited in single field (but I can change
    that if I need to) - so how do I make those items display as
    selected in list. I'm using asp and standard dreamweaver list based
    on a recordset.

    There is a better approach. I faced a similar problem and put all the logic in a Javascript function. I modified my code to suit your needs.
    My HTML will have the following.
    <body onLoad="javascript:initLanguages();">
      <form name="languageForm">
        <select size="1" name="languagesList">
        </select>
      </form>
    </body>I created a Javascript function
    <script language="Javascript">
      //-- put all your languages here in a Javascript Array if they are fixed.
      //-- If you get the langauges from a Java object (dynamic or configurable), generate the Javascript in that object and insert a scriptlet in the HTML that plugs in the generated Javascript into this HTML. If so, take care of the quotes and double quotes. They are tricky !!!
      var languageArray = new Array("Fran?ais", "English", "Espanol", "Deutsch", "Italiano");
      function initLanguages ()
        var listCounter = 0;
        for (var ind=0; languageArray != null && ind < languageArray.length; ++ind)
          var obj = eval("new Option" + languageArray[ind]);
          eval("document.languagesForm.languagesList.options[listCounter]=" + "new Option" + languageArray[ind]);
          if(document.languagesForm.languagesList.options[listCounter].value == "<%= selectedLanguage %>")
            document.languagesForm.languagesList.options[listCounter].selected = true;
          listCounter += 1;
    </script>
    selectedLanguage is something you get in the Java code
    <%
      selectedLanguage = myObj.getSelectedLanguage();
    %>

  • Af:tree selected item

    I want to display the selected item from a tree (and to store this into a variable). I tried with selection_listener, but I don't know exactly what to write in the bean. The disclosed_row_keys is used to expand all nodes.
    <af:tree value="#{bindings.ConfigTreeParent2.treeModel}"
    var="node"
    rowSelection="single" id="tree1"
    selectionListener="#{left_tree.selection_listener}"
    disclosedRowKeys="#{left_tree.disclosed_row_keys}">
    <f:facet name="nodeStamp">
    <af:outputText value="#{node}"/>
    </f:facet>
    </af:tree>
    Thanks,
    vio

    Hi vio,
    The method signature for selectionListener is
    public void someMethodName(SelectionEvent ev);
    The selection event contains the selected row keys (well actually it contains the delta which should be improved imho like oldSelection and newSelection, but in the case of single selection, you can simply use the added list more or less), you can then extract the data associated with each row keys. So, in your case, I suggest you inject the TreeModel in your bean. Here's an example:
    In the code:
    public class MyTreeController
        private TreeModel model;
        private MySelectionManager selectionManager;
        public TreeModel getTreeModel()
            return model;
        public void setTreeModel(TreeModel model)
            this.model = model;
        public MySelectionManager getSelectionManager()
            return selectionManager;
        public void setSelectionManager(MySelectionManager manager)
            this.selectionManager = manager;
        public void selectionPerformed(SelectionEvent ev)
            Object selected = getFirstRowKey(ev.getAddedSet());
            if (selected == null)
                Object unselected = getFirstRowKey(ev.getRemovedSet());
                if (selectionManager.isSelected(getRowData(unselected)))
                    selectionManager.setSelection(null);
            else
                selectionManager.setSelection(getRowData(selected));
        private Object getFirstRowKey(RowKeySet set)
            for (Object key : set)
                return key;
            return null;
        private Object getRowData(Object rowKey)
            TreeModel model = getTreeModel();
            Object oldRowKey = model.getRowKey();
            try
                model.setRowKey(rowKey);
                return model.getRowData();
            finally
                model.setRowKey(oldRowKey); // Always restore the state
    public class MySelectionManager
        private Object selection; // Or another more precise type
        public Object getSelection()
            return selection;
        public boolean isSelected(Object data)
            return selection != null && selection.equals(data);
        public void setSelection(Object selection)
            this.selection = selection;
    }In the faces-config.xml
    <managed-bean>
      <managed-bean-name>selectionManager</managed-bean-name>
      <managed-bean-class>MySelectionManager</managed-bean-class>
      <managed-bean-scope>pageFlow</managed-bean-scope> <!-- That one can be persistent across requests -->
    </managed-bean>
    <managed-bean>
      <managed-bean-name>treeController</managed-bean-name>
      <managed-bean-class>MyTreeController</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    <!-- request scope is important here since we don't know the exact lifespan of bindings.ConfigTreeParent2.treeModel -->
      <managed-property>
        <property-name>selectionManager</property-name>
        <property-class>MySelectionManager</property-class>
        <value>#{selectionManager}</value>
      </managed-property>
      <managed-property>
        <property-name>treeModel</property-name>
        <property-class>org.apache.myfaces.trinidad.model.TreeModel</property-class>
        <value>#{bindings.ConfigTreeParent2.treeModel}</value>
      </managed-property>
    </managed-bean>In your page:
    <af:tree value="#{treeController.treeModel}"
             var="node"
             id="tree1"
             rowSelection="single"
             selectionListener="#{treeController.selectionPerformed}"
             disclosedRowKeys="#{left_tree.disclosed_row_keys}">
      <f:facet name="nodeStamp">
        <af:outputText value="#{node}"/>
      </f:facet>
    </af:tree>Note that I preferred to use the tree model from the bean rather than using directly the databindings here. I did so to improve reusability and declarativity of the page as you could now simply alter the injected tree model within the faces-config to have your page point on a completely different data source.
    Regards,
    ~ Simon

  • Trinidad Myfaces - selectManyShuttle - initially selected items?

    Hi,
    In selectManyShuttle, how can I display initially selected items. In backing bean, how should I handle it?
    Thanks in advance,
    Srihari

    Just preset the property behind its 'value' attribute in the constructor or initialization block of the backing bean.

  • Row wise Initialization - "Session Variable has no value Definition"

    Hi,
    I have gone through other posts relating to this error, but could not find a solution.
    I have defined an initialization block with 'Data Source' as SELECT 'TEST_VARIABLE', cost_center from XX_COST_CENTER.
    In the 'Edit Data Target', i have selected the 'Row Wise Initialization' option.
    When i 'Test' this initialization block, using the 'Test' button, i get the exected output, with all the different Cost Centers being defined.
    However, in the Presentation Services when i add a column and change its formula to VALUEOF(NQ_SESSION.TEST_VARIABLE), i get an error
    +[nQSError: 23006] The session variable, NQ_SESSION.TEST_VARIABLE, has no value definition.+
    Would appreciate some input, to check if i have missed any steps, or am doing something wrong
    Thanks & Regards,
    Ab
    Edited by: obiee_user_ab on Jan 16, 2012 6:25 AM

    Hi,
    Error is caused because no value is returned from the sesision variable for the logged in user, you may check the NQquery.log file to see if the initblock was successfull and if that returned any rows, try setting default value in the session variable
    It might also happen when
    1. You created the variable as Repository variable in RPD and referring as session variable in Answers
    2. It may also happen when you are referring the Session variable Name wrongly in Answers. E.g "Current Week" in RPD (2 Words) and CurrentWeek in Answers (Single word).
    Try to use the same letter case for the name of the variable (upper and lower).
    Hope this helps.
    Regards
    MuRam

  • TopN limit on pivot table row display, not selection

    Hi all,
    I'm trying to create a pivot table which only displays the top 20 rows of data I'm interested in. I know I can filter the data with the TopN function or one of the columns "is in top n" filter, but I'm displaying the data as a percentage, and I want these to accurately refelect the full data available not only the items displayed:
    Example:
    Text-Description 1, 160, 80%
    Text-Description 2, 20, 10%
    Text-Description 3, 10, 5%
    Text-Description 4, 10, 5%
    Say I want to only show the top 2 rows, and get:
    Text-Description 1, 160, 80%
    Text-Description 2, 20, 10%
    Whereas what I actually get is:
    Text-Description 1, 160, 88.8%
    Text-Description 2, 20, 11.1%
    The percentage figure is calculated from the data selected, not just to limit the rows displayed. My other way through this is to get the "text description" to also have a conditional field that returns "Others" that uses the TopN function, where I'd get:
    Text-Description 1, 160, 80%
    Text-Description 2, 20, 10%
    Others, 20, 10%
    Does anyone have any other ideas?
    Thanks in advance

    Create a dashboard prompt and set the formula as i and set it to edit box and give the presentation variable name.
    use this presentation variable in topn function like
    TOPN(column,@{variablename}{defaultvalue})
    Venkat V

  • How can I display "detailStamp" facet selectively for rows in a table ?

    Hi,
    My JDEV version is Studio Edition Version 11.1.1.5.0
    I am trying to display "detailStamp" facet selectively .
    If I read api in link below
    http://docs.oracle.com/cd/E26098_01/apirefs.1112/e17488/oracle/adf/view/rich/component/rich/data/RichTable.html
    Use the "detailStamp" facet on the Table to include a collapsable content area for each table row. Please note that the height of the open detail area will be a set height based on the height of the detailStamp component. Adding a component that changes in height (like showDetail or panelBox) will by default produce strange results when the detailStamp component's height changes.
    Detail Stamp can be selectively displayed for rows in the table by EL binding the "rendered" attribute of the "detailStamp" facet to "true" or "false". The EL binding can contain references to the table "var" attribute since during rendering it will be executed in the context of the row. Disclosure icon is displayed only for rows which have rendered="true".
    I can see that i can achieve it by setting rendered property for that facet. BUT this property is not available in Studio Edition Version 11.1.1.5.0

    Hi Frank.
    Thanks for your quick reply .
    But I am using Studio Edition Version 11.1.1.5.0 . In this version the property RENDERED of f:facet name="detailStamp" is NOT allowed.
    Edited by: user13764942 on Feb 7, 2013 5:48 AM
    Put in another way , I want to render the "detailStamp" facet selectively for rows , so for that I need the RENDERED property of "detailStamp" facet. This property is ONLY available in Jdev version 11.2 . I am using Jdev 11.1.1.5.0 so I need some alternative to RENDERED property as this property is NOT available in Jdev 11.1.1.5.0.
    Please suggest some way to achieve this behaviour of displaying "detailStamp" facet selectively ....
    Thanks!
    Edited by: Mangpal Singh on Feb 7, 2013 11:57 PM

  • Display all valid items and select multiple items

    Let us say I have valid items in table. For each purchase user can select few items from the list. I have to display all valid items from table and user should able to check items to buy. What is the best way we can implement this in forms.
    Thanks, lalitha

    For all the valid items you can create LOV as i understood then user can choose what he wants. But this sentence ti still confusing to me. Or what is the tricky things in you scanerio if only you have to show the valid item then use LOV.
    Lalitk wrote:
    and user should able to check items to buy.-Ammad

  • Bug (possibly?): SelectManyShuttle fails to display selected items

    Bug (possibly?): SelectManyShuttle fails to display selected items when valuePassThru="true" in ADF 10g
    Hello all,
    When run, the example below shows a Select Many Shuttle with four choices in the leading list. When items are shuttled to the training list and the page is submitted the trailing list is rendered with no items selected. Is this a bug?
    Configuration
    This example was constructed using jDeveloper 10.1.3.5.0.
    A new application was created using the Web Application [JSF, ADF BC] template although no business components are used.
    Steps to Reproduce
    1. Create the following backing bean class.
    package com.fmcna.adf.test.view;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    public class ShuttleBean {
        public ShuttleBean() {
        private List availableItems;
        private List selectedItems;
        public void setAvailableItems(List availableItems) {
            this.availableItems = availableItems;
        public List getAvailableItems() {
            //populate with a List of SelectItem instances on the inital call to this method
            if(this.availableItems==null) {
                this.availableItems=generateSelectItemsList();
            return availableItems;
        public void setSelectedItems(List selectedItems) {
            this.selectedItems = selectedItems;
        public List getSelectedItems() {
            return selectedItems;
         * Build a List of SelectItem instances to be used by an af:selectManyShuttle
         * @return A List containing SelectItems instances
        private List generateSelectItemsList() {
            List initialItems = new ArrayList();
            initialItems.add(new SelectItem(new Integer(11),"First Choice"));
            initialItems.add(new SelectItem(new Integer(22),"Second Choice"));
            initialItems.add(new SelectItem(new Integer(33),"Third Choice"));
            initialItems.add(new SelectItem(new Integer(44),"Fourth Choice"));
            return initialItems;
    }2. Configure the ShuttleBean class as a session scoped managed bean as in the following faces-config.xml file.
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
      <managed-bean>
        <managed-bean-name>ShuttleBean</managed-bean-name>
        <managed-bean-class>com.fmcna.adf.test.view.ShuttleBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      <application>
        <default-render-kit-id>oracle.adf.core</default-render-kit-id>
      </application>
    </faces-config>3. Create a JSP page containing an af:selectManyShuttle with a nested f:selectItems component. Wire the values for these components to the properties in the managed bean.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <f:view>
      <html>
        <head>
          <meta http-equiv="Content-Type"
                content="text/html; charset=windows-1252"/>
          <title>testShuttle</title>
        </head>
        <body><h:form>
            <af:selectManyShuttle value="#{ShuttleBean.selectedItems}" valuePassThru="true">
                <f:selectItems value="#{ShuttleBean.availableItems}"/>
            </af:selectManyShuttle>
            <af:commandLink text="Postback"/>
        </h:form></body>
      </html>
    </f:view>4. Run the JSP. Validate that the trailing list is initially empty.
    5. Shuttle one or more items to the trailing list and click the Postback button. Validate that when the page refreshes the trailing list is again empty.
    Thanks for any input you might be able to provide.
    Chris Mihalcik
    Edited by: user5384858 on Jun 14, 2010 1:06 PM

    I'm holding my Nano in my hot little hands with ALL of the things you listed, but here's the sad, simple truth: you CAN'T use iTunes to sync everything. It works well for:
    1) Music
    2) Videos (except sometimes in Vista)
    3) Photos (as long as they're not too large)
    but is terrible for:
    1) calendar
    2) contacts
    3) To-Do lists
    For the latter use something like "iGadget" (www.ipodsoft.com). I also edit/store notes w/iGadget plus it allows you to export files, etc.
    I gave up on syncing iTunes w/Outlook long ago. Good luck.

  • Displaying the selected rows in ALV Grid output

    Hi Experts,
    I am developing one interactive ALV Grid report where user can process the selected records/rows from the ALV Grid output.
    for displaying the ALV Grid, I have used the class CL_GUI_ALV_GRID class. I am working on ECC 6.0 system.
    when I select any records/rows from output and then press any Application Toolbar button, PAI and then PBO modules of the screen gets executed as per the normal flow.
    however After PBO, when same ALV output comes, all the selected/highlighted rows appear as unselected, that means I want to retain the ALV
    rows selection during the round trip.
    please advise.
    Regards,
    Jagesh

    Hi,
    Feiyun Wu is correct.
    Get_selected_rows and set_selected_rows are the methods to be used .
    Some code:
    Note the sequence of code:
    FORM set_gui_alv_grid_1 .
      DATA: wa_layout TYPE lvc_s_layo ,
            wa_print TYPE lvc_s_prnt .
      DATA: it_sort TYPE lvc_t_sort ,
            wa_sort TYPE LINE OF lvc_t_sort .
      DATA: it_fieldcatalog TYPE lvc_t_fcat.
      IF gui_custom_container_1 IS INITIAL .
        CREATE OBJECT gui_custom_container_1
          EXPORTING
            container_name = 'GUI_CUSTOM_CONTAINER_1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6 .
        IF sy-subrc <> 0.
        ENDIF.
        PERFORM get_field_catalog
          USING gc_log_group_1
          CHANGING it_fieldcatalog  .
        CREATE OBJECT gui_alv_grid_1
          EXPORTING i_parent = gui_custom_container_1.
        CREATE OBJECT ob_event_receiver_1
          EXPORTING log_group = gc_log_group_1 .
    * registers the event handlers
        SET HANDLER ob_event_receiver_1->handle_toolbar      FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->handle_user_command FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->print_top_of_page   FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->hotspot_click       FOR gui_alv_grid_1 .
        wa_layout-cwidth_opt = abap_true .
    *   wa_layout-excp_fname = gc_excp_fname .
    *   wa_layout-ctab_fname = gc_ctab_fname.
    *   wa_layout-excp_led   = abap_true .
        CALL METHOD gui_alv_grid_1->set_table_for_first_display
          EXPORTING
            is_layout       = wa_layout
            is_print        = wa_print
            i_save          = 'A'
            is_variant      = gs_disvariant_1
          CHANGING
            it_sort         = it_sort
            it_fieldcatalog = it_fieldcatalog
            it_outtab       = it_alv_grid_1.
      ELSE .
        CALL METHOD gui_alv_grid_1->refresh_table_display.
    * Restore selections
        CALL METHOD gui_alv_grid_1->set_selected_rows
          EXPORTING
            it_index_rows = ob_event_receiver_1->it_rows.
    * Restore position
        CALL METHOD gui_alv_grid_1->set_scroll_info_via_id
          EXPORTING
            is_col_info = ob_event_receiver_1->wa_col
            is_row_no   = ob_event_receiver_1->wa_roid.
      ENDIF.
    ENDFORM .                    "set_gui_alv_grid_1
    Regards.

  • How to get selected item value and display text in selectOneChoice ?

    Hi
    Thank you for reading my post
    I bind the a selectOneChoice component to my backing bean so i have an object which represent this component in the backing bean.
    now i need to find which item is selected by use , i know that i can use
    getSelect_service().getValue.toString() , but it will return the value of the selected item, how about its display text ?
    I should say that i create an static list for selectOneChoice items.
    thanks

    Using JDeveloper 10.1.3.1, freshly downloaded off OTN. I used the following code to try and identify the problem you are encountering. I attempted to use a valueChangeListener in combination with af:selectOneChoice components that use SelectItems and the singular SelectItem. I could not reproduce the error in either case. Please post more information about your development environment.
              <af:selectOneChoice label="Label 1"
                                  binding="#{backing_test.selectOneChoice1}"
                                  id="selectOneChoice1"
                                  valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <af:selectItem label="1" value="1"
                               binding="#{backing_test.selectItem1}"
                               id="selectItem1"/>
                <af:selectItem label="2" value="2"
                               binding="#{backing_test.selectItem2}"
                               id="selectItem2"/>
                <af:selectItem label="3" value="3"
                               binding="#{backing_test.selectItem3}"
                               id="selectItem3"/>
              </af:selectOneChoice>
              <af:selectOneChoice label="Label 2"
                                  binding="#{backing_test.selectOneChoice2}"
                                  id="selectOneChoice2"                              valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <f:selectItems value="#{backing_test.items}"
                               binding="#{backing_test.selectItems1}"
                               id="selectItems1"/>
              </af:selectOneChoice>
        public void valueChangeListener(ValueChangeEvent evt){
            // returns a UISelectOneChoice object
            System.out.println(evt.getSource().getClass().getName());
            // returns a string
            System.out.println(evt.getNewValue().getClass().getName());
        public Map getItems(){
            items = new HashMap();
            items.put("11","11");
            items.put("12","12");
            items.put("13","13");
            return items;
        }

Maybe you are looking for