0 Replies Latest reply on Mar 28, 2012 5:45 PM by Hung Phan

    How to get itemValue in rich: orderingList in RichFaces 4.2.0

    Hung Phan Newbie

      Hello everybody.

      In this example, I created rich:orderingList and display the data input to it. However, I encountered a very annoying problem, it can not get the selected value of that List. The itemValue not working:




        <rich:orderingList listHeight="100px" id="lstSuggestion" var="label" itemValue="#{label}" onclick="alert('#{label.name}');" value="#{tC6Bean.lst}">


                          <f:converter converterId="orderConverter"/>

                          <a4j:ajax event="change" execute="lstSuggestion" render="errorText" listener="#{tC6Bean.viewSelectAction(label)}">                       



                              <f:facet name="header">Name</f:facet>







      The Managed Bean


        public void viewSelectAction(LabelEntity lbl){

              try {

      alertError=Response.getAlertString("SelectValue: "+lbl.getName());

              } catch (Exception e) {

      alertError=Response.getAlertString("Error: "+e.getMessage());





      And when we click, the box show this:




      I have to use solution is put into a div orderingList item and event handlers <a4j: jsFunction div when clicking on it. But this way is not so regular.

      If you have time, welcome to visit my wordpress to view and download project demo of bugs( pleasechoose testcase 6)