Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sorting in bean objects  RSS feed

 
payal Jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
payal Jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you give me any Link to or any example of this algorithm
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure that you can type "sorting java collections" into google as well as I can.
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Payal,


You might be looking something similar to below:









[ September 10, 2008: Message edited by: Chandra Bhatt ]
 
payal Jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help...
I was looking for this sorting only.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!