0 Replies Latest reply on Jul 9, 2008 4:39 PM by Mike Hanafey

    listShuttle with actionListener component??

    Mike Hanafey Newbie

      I am using a listShuttle to control the columns that appear in a data table. I also wanted to be able to control the sort order of rows in the table by including a sort control in the shuttle. Clicking on this control would cycle between no sort, ascending, or descending. The order of columns in the shuttle would control the order of the components of a multi-key sort.

      The problem is the actionListener does not get called.

      An example of the listShuttle is shown below. The a4j:commandButton is supposed to toggle the sort state of columns, but the actionListener is never called, even though an ajax request is initiated when the button is clicked:

      <rich:listShuttle id="colsShuttle" var="ltc" converter="#{RestrictionContainer.leadTable.columnsConverter}"
       listsHeight="120" sourceCaptionLabel="Excluded" targetCaptionLabel="Included"
       sourceValue="#{RestrictionContainer.leadTable.freeColumns}"
       targetValue="#{RestrictionContainer.leadTable.columns}">
       <rich:column>
       <h:outputText value="#{ltc.header}"/>
       </rich:column>
       <rich:column>
       <a4j:commandButton
       image="#{ltc.sort == 0 ? '/images/add=16x16.png' ltc.sort > 0 ? '/images/sort_up=16x16.png' : '/images/sort_down=16x16.png'}"
       actionListener="#{ltc.actionListenerSortToggle}" ajaxSingle="true"/>
       </rich:column>
       <a4j:support event="onlistchanged" reRender="resultsTable,colsShuttle"/>
       <a4j:support event="onorderchanged" reRender="resultsTable"/>
      </rich:listShuttle>