tags:

views:

184

answers:

1

Hi I am studying tomahawk, I just want to know if I generate a datatable using <t:columns> then how to sort the dataTable on the click on the header of that particular column, like we are using <t:commandSortHeader> in normal <t:column> attribute. Kindly Help.

+1  A: 

One possibility is to use jQuery plugin sort. Look here

The other is to use t:dataTable together with t:commandSortHeader as you have described

<t:dataTable  
id="data"  
value="#{BACKINGBEAN.DATA}"  
var="item"  
...  
sortable="true"
rows="10">
Shervin
thanks for the for telling the possiblity in jQuery ,but wanted to try without it, my doubt is like even when if if put <t:commandSortHeader> within the <t:columns> its getting sorted according to the first column only, and not with respective of individual column.
Hari
Yes are you right.You will need to do this on the SQL side before you retrieve the list is my guess. You need to `order by some1 some2`
Shervin