You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ni...@ubs.com on 2003/10/10 14:46:12 UTC

Multiple form-beans and Action class

Hi,

Is it possible to point multiple form beans to the same action within struts-config file? Kindly let me know using an example.

Cheers,
Nitin

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Multiple form-beans and Action class

Posted by Ted Husted <hu...@apache.org>.
The controller will only populate a single ActionForm for each 
ActionMapping. At least automatically. The HttpServerRequest is passed 
to your Action, so you could always populate some others if you like. 
See the code in the RequestProcessor to see how the controller does it.

Depending on your circumstances, another approach is to use a 
coarse-grained ActionForm class that uses all the properties your 
application (or module) uses at one time. You can then setup different 
form-bean names to specify different validations for various pageflows.

HTH, Ted.

Nitin.Narayan@ubs.com wrote:

> Hi,
> 
> Is it possible to point multiple form beans to the same action within struts-config file? Kindly let me know using an example.
> 
> Cheers,
> Nitin
> 
> Visit our website at http://www.ubs.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.

"Get Ready, We're Moving Out!!" - <http://www.clark04.com>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org