See the tomahawk examples, there's a good example of t:dataTable sortColumn, and sortAscending should bind to getters/setters for a String and boolean.
Malone, Daniel wrote:
> Hi,
>
> I'm trying to get the MyFaces dataTable to sort my columns. Getting
> to show up my data was no problem so I think I'm on the right way.
>
> I'm not sure what the two attributes "sortColumn" and "sortAscending"
> mean.
> I know that a String and a boolean is expected but that's about it.
> Maybe
> someone can help me out.
>
> I had a look at the examples on Irian.com but they don't help very much.
>
> Is more for looking at.
>
> I'm thankful for any hint.
>
> JSP Page Code
>
> <t:dataTable
> id="tbUsers"
> var="user"
> value="#{Results.list}"
> sortColumn="#{Results.sort}"
> sortAscending="#{Results.ascending}">
>
> <t:column>
> <f:facet name="header">
> <t:commandSortHeader columnName="nr">
> <outputText value="nr" />
> </t:commandSortHeader>
> </f:facet>
> <h:outputText value="#{user.nr}"/>
> </t:column>
> <t:column>
> <f:facet name="header">
> <t:commandSortHeader columnName="status">
> <h:outputText value="Status" />
> </t:commandSortHeader>
> </f:facet>
> <h:outputText value="#{user.status}" />
> </t:column>
>
> ...
>
> </t:dataTable>
>
> Best regards,
>
> Daniel Malone
>
--
Dave Brondsema
Software Developer
Cornerstone University
signature.asc
Description: OpenPGP digital signature

