PDA

View Full Version : Sorting java table



Mike
24-05-2010, 05:43 PM
I have a table (csv) with some data in it, and a Java servlet that is pulling that data and displaying it in a web table.

CSV has 5 columns:
FirstName, LastName, Age, Address, Phone

I want to display the data in the table sorted by Age. Is this possible without too much trouble? I'm thinking collections.sort somehow, but this is only sorting on the first column (or rather, I think, the whole row)

Thanks,
Mike.

MushHead
24-05-2010, 06:26 PM
Saw this a few months ago - looks like it should help...

www.kryogenix.org/code/browser/sorttable/

EDIT: Whoops! just realised this was client-side. Possibly not what you want, but may be a pointer to the solution?