2 Replies Latest reply on Jul 7, 2010 4:12 AM by Marc Froehlich

    Problem with picklist - strange setter calling...

    Marc Froehlich Newbie

      Hello there,



      I try to use a rich:picklist for choosing some selectitems.

      I use Richfaces-ui-3.3.2.SR1, Tomcat 6.026.




      The left (source-list) side of the picklist I give some SelectItems, wich are shown normally.

      If i click to these entrys they appear on the right side and disappear on the left side.


      So long...fine - but the setter didnt work correctly - its simply not called except I copy the last element from the right list to the left.


      Strange, very strange - I has read about a bug of the component, so is there any workaround wich will make the usage of the picklist possible?


      If the usage of the picklist may is not possible I can use a shuttle instead of this - but can anyone shortly say me what type the source have to be? I tried selectitems but this doesent work.



      Last but not least a little bit code:


      The Picklist in jsp file (picklist is placed in a data grid):



      <rich:pickList id="createUserNasAllowedShuttle"
                                              <f:selectItems value="#{OverviewBean.nasArray}" />
                                              <a4j:support event="onlistchanged"
                                                  process="createUserNasAllowedShuttle" ajaxSingle="true"





      The source List in Backing bean:



      nasArray = new SelectItem[nasListe.size()];
                   for (int i = 0; !nasListe.isEmpty(); i++) {
                  nasArray[i] = new SelectItem(nasListe.getFirst().getId(), nasListe
                          + " " + nasListe.getFirst().getStreet_no());







      The target List in backing bean:



           * Test-target for the selectitems with test outline (for never will be executed becouse the target list is
           * empty in the one event if the setter will be called (right side of list will be empty...))
          List<SelectItem> test = new ArrayList<SelectItem>();
          public List<SelectItem> getTest() {
              return test;
          public void setTest(List<SelectItem> test) {
              System.out.println("OVB: setter entered");
              this.test = test;
              for (int i = 0; i<test.size(); i++) {
                  System.out.println("Listeninhalt bei " + i + " = " + test.get(i));




      Tanks for reading!