I have a "list" of articles to be retrieved from the
database and displayed.

The first time I display the list, I simply sort the
list by posting date and descending order (without
providing a form) when I query the database.

Thereafter, users are offered opportunities on top of
the table of the list to choose 'sort' criteria from a
drop down menu and to choose 'order', which is either
ascending or descending, with a GO button.  That is to
say, the same action (ListArticles) is called with a
'form' consisting of two menus.

In my Java class that extends Action, I did the
following:

     String sort  = request.getParameter( "sort" );
     String order = request.getParameter( "order" );
     if ( sort.length() == 0 ) sort = "PostDate";
     if ( order.length()== 0 ) order = "DESC";

I do not know how to handle the name attribute of the
<action .... /> tag in the struts-config.xml.

Those are the same action.  There is actually an empty
form the first time the action is called.  And there
is a form consisting of two menus the second time the
action is called.

I need your instructions and help.


                
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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

Reply via email to