2 Replies Latest reply on Aug 13, 2010 5:22 AM by Christian Nockemann

    ListShuttle doesn't populate targetValue in BackingObject

    Christian Nockemann Newbie

      Hello Everyone,

       

      this is my code:

       

      JSP:

      <rich:listShuttle sourceValue="#{analyseBean.catalog.catOptions}"
       targetValue="#{analyseBean.catalog.catTarget}" rowKeyVar="rkv"
       var="option" orderControlsVisible="false"
       fastOrderControlsVisible="false" listsHeight="400">
       <rich:column id="option">
       <f:facet name="header">
       <h:outputText styleClass="headerText" value="Filteroptionen" />
       </f:facet>
       <h:outputText value="#{option}" />
       </rich:column>
      </rich:listShuttle>
      

       

      BackingBean:

      private List<String> catOptions = new ArrayList<String>();
      private List<String> catTarget = new CopyOnWriteArrayList<String>();
      public void setCatOptions(final List<String> catOptions) {
                this.catOptions = catOptions;
           }
      
      public void setCatTarget(final List<String> catTarget) {
                this.catTarget = catTarget;
           }
      

       

       

      I read that you need to override the hashCode() and equals() methods for the items in the targetValue-List but in this case i'm using Strings.

      Is anything wrong with my code?