views:

33

answers:

2

I am creating table with Wicket's AjaxFallbackDefaultDataTable and using JQuery tablesorter plugin(http://tablesorter.com) for sorting columns.

Sorting works fine for first time when I load page, but when I click on any pagination link on the table, sorting is not working. Basically wicket is replacing entire table when I do pagination and JQuery is not aware of this event. How do I solve this problem?

+1  A: 

You might want to reconsider this design entirely.

It really is not sensible to have pagination server-side and sorting client-side.

The data sent down to the browser will not be the entire dataset, but only a block of data for the current paged subset. Sorting will change which block something should be in.

You really should either be sending down the entire dataset and doing both pagination and sorting in the browser, or (more naturally for large sets), doing both pagination and sorting on the server.

Don Roby
I think you are right, I will reconsider my design.
goutham
A: 

If you want sorting, use a SortableDataProvider for your table.

virgium03