You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cool dude <co...@yahoo.com> on 2002/02/08 13:32:44 UTC

Validation of a FormBean used in multiple pages

Hi Guys,
       I'm a newbee to struts & so I'm filled with
questions (some of them are outrightly stupid at times
:) ... herez one of the problems that I'm facing. The
struts User Guide suggests that a form that spans
across multiple pages should be submitted to the same
form bean. This will lead to a situation where the
same form bean's validate() will have to cater for
multiple forms. How can I do this gracefully? I know I
can pass a hidden variable in each othe forms which
would tell me which form was submitted but this looks
cumbersome to me. My form bean validate() will be
cluttered with if-then-else statements. Is there any
better way that struts provides so that we can handle
this situation more gracefully. 

I remember seeing something on similar lines for the
Action subclasses, wherein one action class is
handling multiple pages & we want different methods to
handle this. This can be taken care of by using
DispatchAction & that solution looks pretty clean-cut.
Something on the similar lines would be really kewl
...

Thanx in advance,
VD.

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>