5 Replies Latest reply on May 27, 2010 5:51 AM by anmalygin

    problem with  rich:listShuttle (empty list in backing bean of targetValue)

      i have

       

      <rich:listShuttle   targetValue="#{FormEditLessonBean.cssResult}" id="cssByDescipline" sourceValue="#{FormEditLessonBean.cssSelect}"
                                                var="items" converter="#{FormEditLessonBean.converter}"
                                  sourceListWidth="350" targetListWidth="350"   showButtonLabels="false" fastOrderControlsVisible="false" orderControlsVisible="false"  switchByDblClick="true" >
                                  <rich:column>
                                      <h:outputText escape="false" value="#{items.forPickList}"></h:outputText>
                                  </rich:column>
                                   <a4j:support ajaxSingle="true" event="onlistchanged" reRender="numberStudent" />
                              </rich:listShuttle>
                               <rich:message for="cssByDescipline"/>

       

      when call setter for targetValue="#{FormEditLessonBean.cssResult}" - it has empty list, but converter work fine for each object. Help please!!

       

      bean ---

        public void setCssResult(List<CssItem> css) {

              System.out.println("set!!!");

             // cssResult=css;   

       

          }

       

      converter

        public Object getAsObject(FacesContext arg0, UIComponent arg1, String string) {

       

                  if (string == null) {

                      return null;

                  }

       

                      return new CssItem(Integer.parseInt(string));

              }

       

              public String getAsString(FacesContext arg0, UIComponent arg1, Object obj) {

       

                      if(obj instanceof CssItem)

                              return Integer.toString(((CssItem)obj).getId());

                      return null;

              }