Thanks for your quick reply...

I've read the wiki, and I think I'm doing everything right, but if I use the
following code in my page, then only the column WITHOUT a commandSortHeader
actually sorts (securitySymbolColumn). And regardless of whether I add a
CommandSortHeader to the first column, it doesn't sort either (probably
because it's a column of commandLinks).

----------------------------------------------------

<t:dataTable   id="datatable"
                        value="#{restlist.restList}" 
                        rows="#{restlist.rowsPerPage}"
                        sortColumn="#{restlist.sortColumn}"
                        sortAscending="#{restlist.sortAscending}"
                        preserveSort="true" >

<t:column sortable="true">
        <f:facet name="header">
                <h:outputText id="restrictedListIdHeader" value="#{Message.Id}" 
/>
        </f:facet>
        <h:commandLink     id="restrictedListIdLink"
                                        action="showDetails" 
                                        
actionListener="#{restlist.showDetails}">
                <f:param id="currentRecShowDetails" name="currentRec" 
value="#{aRow}" />
                <h:outputText id="restrictedListIdColumn"
value="#{aRow.restrictedListId}"/>
        </h:commandLink>
</t:column>

<t:column sortable="true">
        <f:facet name="header">
                <t:commandSortHeader columnName="description" arrow="false">
                        <f:facet name="ascending">
                                <t:graphicImage 
url="/resources/images/ascSort.gif" style="border:0px;"
/>
                        </f:facet>
                        <f:facet name="descending">
                                <t:graphicImage 
url="/resources/images/ascSort.gif" style="border:0px;"
/>
                        </f:facet>
                        <h:outputText id="restrictTypeDescHeader"
                                                
value="#{Message.RestrictTypeDesc}" />
                </t:commandSortHeader>
        </f:facet>
        <h:outputText id="restrictTypeDescColumn" 
                                value="#{aRow.description}" />
</t:column>

<t:column sortable="true">
        <f:facet name="header">
                        <h:outputText id="securitySymbolHeader" 
                                                
value="#{Message.SecuritySymbol}" />
        </f:facet>
        <h:outputText id="securitySymbolColumn"
                                value="#{aRow.securitySymbol}" />
</t:column>

<t:column sortable="true">
        <f:facet name="header">
                <t:commandSortHeader columnName="description" arrow="false">
                        <f:facet name="ascending">
                                <t:graphicImage 
url="/resources/images/ascSort.gif" style="border:0px;"
/>
                        </f:facet>
                        <f:facet name="descending">
                                <t:graphicImage 
url="/resources/images/ascSort.gif" style="border:0px;"
/>
                        </f:facet>
                        <h:outputText id="securityDescHeader"
                                                value="#{Message.SecurityDesc}" 
/>
                </t:commandSortHeader>
        </f:facet>
        <h:outputText id="securityDescColumn"
                                value="#{aRow.securityDesc}" />
</t:column>


--
View this message in context: 
http://www.nabble.com/Extended-Datatable-AutoSort-t1836504.html#a5013982
Sent from the MyFaces - Users forum at Nabble.com.

Reply via email to