Auto sort in an t:dataTable does not work with dynamic column list t:columns 
while it does work with t:column
-------------------------------------------------------------------------------------------------------------

                 Key: TOMAHAWK-1561
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1561
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Columns, Extended Datatable
    Affects Versions: 1.1.10
            Reporter: Thorsten Gunkel
            Priority: Minor


I wanted to auto sort a table according to the description here: 
http://wiki.apache.org/myfaces/Working_with_auto_sortable_tables
This works excellent. However, when I replace the different <t:column entries 
for each column with one <t:columns entry which dynamically handles my columns 
the sort does no longer work. There is no error or warning, I can still click 
on the columns and I can choose the active sort column and the sort order, but 
the data is just not sorted at all. Once I add the columns manually with 
<t:column it works again. Honestly, I'm not sure if I did everything right, if 
you have a working example which differs from mine I can test if it works.

<t:dataTable id="MyDataTable" value="#{alias_TableDataBean.resultModel}" 
var="row" rowIndexVar="rowIndex"
             style="width: 100%"
             styleClass="scrollerTable" headerClass="standardTable_Header"
             rowClasses="standardTable_Row1,standardTable_Row2"
             columnClasses="standardTable_Column"
             sortable="true"
             sortColumn="#{alias_TableDataBean.sortColumn}"
             sortAscending="#{alias_TableDataBean.sortAscending}"
             preserveDataModel="false"
             preserveSort="true"
             rows="#{alias_TableDataBean.rowsPerPage}">

  <t:columns value="#{alias_TableDataBean.columns}"
             var="column"
             sortable="true">
    <f:facet name="header" >
      <t:commandSortHeader columnName="#{column.header}"
                           arrow="true">
        <h:outputText value="#{column.header}" />
      </t:commandSortHeader>
    </f:facet>
    <h:outputText value="#{column.value}" />
  </t:columns>

</t:dataTable>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to