| Author |
Sorting the fields of a table
|
bobby chaurasia
Ranch Hand
Joined: Mar 30, 2002
Posts: 84
|
|
I'm using struts framwork. The data for populating the table is fed from the database using jdbc. The output is displayed in the table. The format is something like this ------------------------------------------------------------- S.No | Date | Amount | Details | ------------------------------------------------------------- 1 | 20.02.2003 | 100 | abc | -------------------------------------------------------------| I'm able to display the details in the table. I need to incorporate the functionality where in if the user clicks on Date or Amount ( which are displayed as a link ), the application should sort the rows in acending order. Also I want to display only 10 entries per page and provide 1 2 3 4 ( pages link) so that once the user clicks on these the next 10 entries are displayed. Thanks in advance  [ December 10, 2003: Message edited by: bobby chaurasia ]
|
 |
steve souza
Ranch Hand
Joined: Jun 26, 2002
Posts: 852
|
|
|
Check out the FormattedDataSet. It can easily sort columns by clicking them. There is a live demo off of http://www.fdsapi.com that allows you to enter any sql and have it display as a sortable HTML table with clickable column headers.
|
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
|
 |
bobby chaurasia
Ranch Hand
Joined: Mar 30, 2002
Posts: 84
|
|
Thanks Steve,I did have a look I guess what I am looking for is achieving this using the struts custom tags. Thanks
|
 |
 |
|
|
subject: Sorting the fields of a table
|
|
|