2 Replies Latest reply on Aug 31, 2009 5:49 PM by medloh

    rich:listShuttle sort question

      Hello,

      When we add a few items to the target list, then remove one back to the source list, it always gets reinserted at the bottom of the source list. How do you get the listShuttle component to add things back to the source list in sorted order?

      Here's the code snippet where we're defining the listShuttle in our JSF page:

       <rich:listShuttle id="myListShuttle"
       converter="#{ui$foo.bar}" copyControlLabel="Add" fastMoveControlsVisible="false"
       listsHeight="450px"
       sourceCaptionLabel="Available Columns:"
       sourceListWidth="400px" sourceValue="#{ui$Columns.lstSelectColumnsToChose}"
       targetCaptionLabel="Chosen Columns:"
       targetListWidth="400px" targetValue="#{ui$Query.qryStatement.selectClause.selectedColumns}" var="item">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Table Name"/>
       </f:facet>
       <h:outputText value="#{item.tbl}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Column Name"/>
       </f:facet>
       <h:outputText value="#{item.col}"/>
       </rich:column>
       <a4j:support actionListener="#{ui$Columns.processListChanged}" event="onlistchanged"
       onsubmit="setIsDirty('1');" reRender="Columns"/>
       </rich:listShuttle>