I'm not sure I understand this question but wouldn't you just implement some
comparators?
Then based on the sort option selected you can call something like:
Collections.sort(list, comparator)?
As for the search just have a java module to search thru the collection.
I'm not quite sure how what this question really has to do with Struts.
Unless you use something like the displaytags to display a sortable list for
the names.
-Tim

-----Original Message-----
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 1:26 PM
To: Struts Users Mailing List
Subject: sorting and searching in Struts/tiles


[Forwarded from Dinh Nguyen, his emails aren't reaching the list]

Dinh Nguyen wrote:

Hi,

I am wondering how do you do the sorting and searching in struts.
Let say, when a person views a list of collections (for example, the
list consists of 5 people, each person has first name, last name,
age), there is a drop-down menu on the bottom of the table/page says
that:
1) Sort has two options: a) Ascending b) Descending
2) Search has three options a) Last Name b) First Name c) Age

Since data is not stored in database yet.
so in this case how can I do it using Struts?

Thanks for your help.

DN


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to