1 Reply Latest reply on May 20, 2011 10:54 AM by Rafael de Carvalho

    Pick list not working properly

    Rafael de Carvalho Newbie

      Hello everyone,

       

      Probably it is a simple mistake due to lack of attention, or a bug.

       

      I'm working ia a project that uses richfaces (3.3.1.GA), JBoss Seam and IBM Websphere.

      I'm not able to fill the right list of the pick list! Suspicious of an error in my bean, I put the same list in a rich:dataTable and it renderized properly the results.

       

      Here's a sample of my code:

       

                  <h:form>
                         
                          <rich:pickList
                              id="ratingPickList"
                              listsHeight="250px;"
                              sourceListWidth="415px;"
                              targetListWidth="415px;"
                              copyAllControlLabel="#{messages['pickList.addAll']}"
                              copyControlLabel="#{messages['pickList.add']}"
                              removeAllControlLabel="#{messages['pickList.removeAll']}"
                              removeControlLabel="#{messages['pickList.remove']}"
                              value="#{clusterHome.tempRatings}">
                              <s:selectItems
                                  id="ratings-nao-usados"
                                  value="#{clusterHome.ratingsNaoUsados}"
                                  var="rating"
                                  label="#{rating}" />
                              <s:convertEntity />
                          </rich:pickList>
                         
                          <div style="clear: both"/>
                         
                          <div class="actionButtons">
                          <a4j:commandButton
                              id="update"
                              value="#{messages['common.update']}"
                              action="#{clusterHome.atualizaTemp}"/>
                          </div>
                         
                  </h:form>

      {code:xml}

      <h:form>     
           <rich:pickList
                id="ratingPickList"
               listsHeight="250px;"
               sourceListWidth="415px;"
                targetListWidth="415px;"
                copyAllControlLabel="#{messages['pickList.addAll']}"
                copyControlLabel="#{messages['pickList.add']}"
                removeAllControlLabel="#{messages['pickList.removeAll']}"
                removeControlLabel="#{messages['pickList.remove']}"
                value="#{clusterHome.tempRatings}">
                <s:selectItems
                     id="ratings-nao-usados"
                     value="#{clusterHome.ratingsNaoUsados}"
                     var="rating"
                     label="#{rating}" />
                <s:convertEntity />
           </rich:pickList>
           
           <div style="clear: both"/>
           
           <div class="actionButtons">
           <a4j:commandButton
                id="update"
                value="#{messages['common.update']}"
                action="#{clusterHome.atualizaTemp}"/>
           </div>
      </h:form>

      {code}

       

      Things that I already checked:

      - Equals method

      - Visibility of lists

      - Scope of bean

      - ...

       

      Any help is welcome!

       

      Thanks.