You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2007/03/14 07:20:52 UTC

[Myfaces Wiki] Update of "Working with auto sortable tables" by MikeKienenberger

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by MikeKienenberger:
http://wiki.apache.org/myfaces/Working_with_auto_sortable_tables

The comment on the change is:
Documenting Static sorting

------------------------------------------------------------------------------
  </t:column>
  }}}
  
+ === Static sorting ===
+ 
+ If all you want to do is sort your row data in the display and you don't want to enable any user-specified sorting, you can specify the following:
+ 
+ {{{
+ <t:dataTable ...
+     sortProperty="somePropertyExpression"
+     sortable="true"
+     sortAscending="true"
+     ...
+     var="whatever"
+ }}}
+ 
+ This will sort your data on "#{whatever.somePropertyExpression}", i.e., var="car" sortProperty="color.type".
+ 
+ Unfortunately, there appears to be no way to prevent column headers from being links.
+ 
  === Note ===
  
    * Automatic sorting works only using properties available on a row object, and these must be comparable, i.e, implement the Comparable interface, or else they will be compared as strings