File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60765
    
  65

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: 60765
    
  65

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
 
Similar Threads
need help returning array bean object
finding days of two dates in jsp page
Designing an Airline ActionForm with a Collection of Aircraft
Initialize Data Table using Managed Bean
why new date() prints date ?????