Re: Handling multiple submits from a single form

2004-03-15 Thread Geeta Ramani



Sajith:
This very question was asked and answered recently (just within the
past couple of weeks, I think??).. Maybe you can search the archives..? 
Here's the url for the archives:
http://www.mail-archive.com/[EMAIL PROTECTED]/
Write back to the list if you cannot find what i am referring to and
I'l see if I can find a more specific link for you..
Regards,
Geeta
[EMAIL PROTECTED] wrote:
I
have multiple actions possible from a single JSP page. How can I handle
it using struts? I have single form with multiple buttons and I am using
the html tag library. How can I handle it without using _javascript_?





""
Description: application/unknown-content-type


RE: Handling multiple submits from a single form

2004-03-15 Thread Shobhana.S, ASDC Chennai
 
You can use Dispatch Action.
IXT_5_720IXT_5_719The purpose of the IXT_5_722IXT_5_721DispatchAction class
is to allow multiple operations that normally would be scattered throughout
multiple Action classes to reside in a single class. The idea is that there
is related functionality for a service, and instead of being spread over
multiple Action classes, it should be kept together in the same class. For
eg, Add, delete,View etc.
To use the DispatchAction class, create a class that extends it and add a
method for every function you need to perform on the service. Your class
should not contain the typical execute( ) method, as other Action classes
do. The execute( ) method is implemented by the abstract DispatchAction
class. 
jakarta_IDXTERM_683jakarta_IDXTERM_682You must include one method in your
DispatchAction for every Action you want to invoke for this DispatchAction.
<http://%20/JVXSL.asp?x=1&mode=section&sortKey=hits&sortOrder=desc&view=book
&xmlid=0-596-00328-5/jakarta-CHP-5-SECT-1&open=true&title=Most%20Read%20Book
s&catid=&s=1&b=1&f=1&t=1&c=1&u=1#jakarta-CHP-5-EX-9jakarta-CHP-5-EX-9>
Example 5-9 will help illustrate this. 
 
In struts-config change it as follows for eg:


  
 
 
And in the action of the form specify the value for the parameter method to
the correspoonding function you want to call in the DispatchAction.
Shobhana
 
 
ch05_idx_105925_1ch05_idx_105925_2-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 15, 2004 5:46 PM
To: [EMAIL PROTECTED]
Subject: Handling multiple submits from a single form


 
Hi
 
I have multiple actions possible from a single JSP page. How can I handle it
using struts? I have single form with multiple buttons and I am using the
html tag library. How can I handle it without using javascript?
 
Regards
Sajith


RE: Handling multiple submits from a single form

2004-03-15 Thread shirishchandra.sakhare
use findForward action to dispatch the request to different actions depending upon the 
button pressed or use DispatcherAction
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 15, 2004 1:16 PM
To: [EMAIL PROTECTED]
Subject: Handling multiple submits from a single form


 
Hi
 
I have multiple actions possible from a single JSP page. How can I handle it using 
struts? I have single form with multiple buttons and I am using the html tag library. 
How can I handle it without using javascript?
 
Regards
Sajith

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



Handling multiple submits from a single form

2004-03-15 Thread sajith









Hi

 

I have multiple actions
possible from a single JSP page. How can I handle it using struts? I have
single form with multiple buttons and I am using the html tag library. How can
I handle it without using _javascript_?

 

Regards

Sajith