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.
views:
184answers:
1
+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
2010-03-26 10:43:52
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
2010-03-26 17:38:07
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
2010-03-29 07:48:13