aspose file tools*
The moose likes JSP and the fly likes sorting in bean objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "sorting in bean objects" Watch "sorting in bean objects" New topic
Author

sorting in bean objects

payal Jain
Ranch Hand

Joined: Dec 20, 2007
Posts: 50
Hi i have a bean class objects which consist of Name ,date,Location etc. and i display them on jsp under the heading links of NAME,DATE,LOCATION now when the user clicks on the NAME it should disply the data in descending order of Name.... how to do that please help me..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

Where's the data coming from? If a database, it's best to have the DB do the sorting. If that's not possible, then the collection can be sorted using any of the bazillion sorting algorithms available.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
payal Jain
Ranch Hand

Joined: Dec 20, 2007
Posts: 50
can you give me any Link to or any example of this algorithm
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

I'm sure that you can type "sorting java collections" into google as well as I can.
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Hi Payal,


You might be looking something similar to below:









[ September 10, 2008: Message edited by: Chandra Bhatt ]

cmbhatt
payal Jain
Ranch Hand

Joined: Dec 20, 2007
Posts: 50
Thanks for the help...
I was looking for this sorting only.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sorting in bean objects