GeeCON Prague 2014*
The moose likes JSP and the fly likes sorting functionality in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "sorting functionality in jsp" Watch "sorting functionality in jsp" New topic
Author

sorting functionality in jsp

brams mun
Greenhorn

Joined: Nov 27, 2003
Posts: 25
i have a report, in which the columns is having a name and two gifs, one for ascending sort and the other for the descending sort.
can anyone give me a sample code or site to implement the sorting functionality.

needed a bit quickly..:-))

thnx in advance....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61308
    
  66

"bhramaresh UR ",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61308
    
  66

needed a bit quickly..:-))


You may want to read this topic.
Manoj Gundawar
Ranch Hand

Joined: Nov 17, 2002
Posts: 169
Hi,
If you are getting the column values from the DB, you can re-query DB again with sort statement on the particular column with particular oreder. (When user click on that column)
But if not, then you have write your own algorithm for sorting. Take a look at Comparator, sortedMap and TreeMap API for this.
[ October 07, 2004: Message edited by: Manoj Gundawar ]

Manoj<br />SCJP, SCJD, SCWCD, IBM WSAD.
brams mun
Greenhorn

Joined: Nov 27, 2003
Posts: 25
sorry for using the term "needed quickly"
that i have given keeping in mind my delivery time.
i could able to get the solution with a new algorithm which i have defined.
thanks.
 
GeeCON Prague 2014
 
subject: sorting functionality in jsp