a) The displayTag library can sort for you
b) you can only pass one parameter using html:link (unless you use a Map)
c) if "function" is a Dispatch method you could use javascript onclick event 
handler to submit to the "sort" method, passing the sortOrder parameter - then 
toggle it in your action and put the new value back on the request for next use.

________________________________

From: Chetan Pandey [mailto:[EMAIL PROTECTED]
Sent: Mon 11/12/2006 2:23 PM
To: 'Struts Users Mailing List'
Subject: html:link



Hi All:



I have a <html:link> in the Title of a Table.



Clicking on it should arrange all Rows in ascending Order the first time and
descending order the next time and so on.



I tried the following:



<%

int sortOrder=0;

//<bean:definfe failed miserably

%>



<html:link action="myAction.do?function=sort?sortOrder='${sortOrder++}' "

Event Name

</html:link>



In which (sortOrder % 2 == 0) will determine how to modify the table.



This however failed as we are not allowed to use post-increment operator.



Can anyone recommend a better approach.



Thanks.



Chetan











**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

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

Reply via email to