1 Reply Latest reply on May 22, 2008 1:25 PM by kasim

    Selected not working in orderingList ?

    shasho

      Using RichFaces 3.1.4 + Seam 2.0.1 its seems that the selected of orderingList is not working . When working in the following code and selecting items list is always empty


      the Xhtml

      <a:form id="new_item_list">
      <rich:orderingList value="#{addData.newPersonalList}" var="item" listWidth="200px" controlsType="button" selection="#{addData.newPersonalListChose}" showButtonLabels="false">
      <f:facet name="caption">
      <h:outputText value="Chosen Data"/>
      </f:facet>
      <rich:column>
      <f:facet name="header">
      <h:outputText value="Description" />
      </f:facet>
      <h:outputText value="#{item.itemHeader}" />
      </rich:column>
      </rich:orderingList>
      </a:form>
       <!-- list of entered data -->
      <a:form>
      <a:commandButton value="Remove" action="#{addData.removeItemNew}" reRender=" new_item_list" </a:form>
      

      Java
      Declaration

      private ArrayList<DataToFetch> newPersonalListChose = new ArrayList<DataToFetch>(); // list of chosen from the many list
       private List<DataToFetch> newPersonalList = new ArrayList<DataToFetch>(); // list of items added
      


      Functionality
      public void removeItemNew()
       {
       for(DataToFetch item:newPersonalListChose)
       {
       // check if the item has parts
       for(DataToFetch partItem:newPersonalListParts)
       {
       if (partItem.getItemHeader().equals(item.getItemHeader())) newPersonalListParts.remove(partItem);
       }
       newPersonalList.remove(item);
       }
       }
      
      


      Here is newPersonalListChose has no components while newPersonalList has the inserted components