• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sorting the fields of a table

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
bobby chaurasia
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Steve,I did have a look I guess what I am looking for is achieving this using the struts custom tags. Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic