Struts 2 uses a hierarchical approach to validation which could be
used to support a multi-page workflow. (Struts 1 simulates a hierarchy
by using the page property on the ActionForm.) The validation follows
the Java class, not the action mapping. If class2 extends class1, then
when class2 is validated, the validations for class1 also fire.

If you like to collect all the methods for a workflow into a single
class, then, in practice, class2 might be an empty class that only
exists to appease the XWork Validation system.

HTH, Ted
<http://www.husted.com/ted/blog/>


On 8/29/07, Pavel Sapozhnikov <[EMAIL PROTECTED]> wrote:
> Hey guys. Could somebody provide some input on validation chaining in s2.
> Here's what I need to do. So there has to be a base validation which would
> validate variable x and variable y then every other class has its own
> validation for example Login class would validate if username and password
> exist but the prerequisite is that base validation should pass. How do I do
> that in struts2. Any input would be appreciated. Thanks.
>
> --
> Pavel Sapozhnikov
> xFact, Inc
> [EMAIL PROTECTED]
>

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

Reply via email to