But, this will not properly sort data types such as Dates, and adding a date parser / comparator to the javascript, especially if your using i18n, is no small task.
Any ideas?
Thanks,
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Check out the displaytag example at the AjaxTags project, http://ajaxtags.no-ip.info/ . It's a compromise between pure client-side sorting and refreshing the entire page just to sort. It sends an ajax request to the server to have displaytag do the sorting, and refreshes the div containing the table with the response, not the entire page.
-Jorge
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a version of this that supports dates. I don't have it on me right now, but I don't think it was too hard to implement. I used it in an application where i18n wasn't an issue. I don't know if it'll handle multiple languages.
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see nowhere that displaytag does client-side sorting, correct?
If not, does anyone have any solutions? I saw a reference to this method (sorting with the DOM):
http://raibledesigns.com/page/rd?anchor=client_side_sorting_with_the
But, this will not properly sort data types such as Dates, and adding a date parser / comparator to the javascript, especially if your using i18n, is no small task.
Any ideas?
Thanks,
Mike
Check out the displaytag example at the AjaxTags project, http://ajaxtags.no-ip.info/ . It's a compromise between pure client-side sorting and refreshing the entire page just to sort. It sends an ajax request to the server to have displaytag do the sorting, and refreshes the div containing the table with the response, not the entire page.
-Jorge
Thanks for the response. But, what I really need is client side sorting to reduce the load on the server.
Any ideas?
Thanks,
Mike
Here's the direct link.
http://66.93.98.248:8080/ajaxtags/displaytag.jsp
BTW, this example also shows "client-side" paging, since both displaytag's sorting and paging occur via ajax.
-Jorge
GR8! Thanks for posting :-)
I cannot access both the page.. I have to use onlick function of javascriot in my display column tag.let me know hows tht possible preferably w/o ajax
I have a version of this that supports dates. I don't have it on me right now, but I don't think it was too hard to implement. I used it in an application where i18n wasn't an issue. I don't know if it'll handle multiple languages.
Matt