Ted, Regarding field validations, can you provide any reason why the validwhen validator is not provided in Struts 2? . I think this is a step backwards from Struts 1 where we could easily manage conditional validation (validate fieldb only if fielda & fieldc meet some condition)
Also, the validators in Struts 1 returned true/false for success/failure, and we had the option of adding messages or not ; but in Struts 2 the only way to tell a validation failed is by the presence of errors on the field. Both of these limitations (if you will) make conditional validation (without error message for the condition itself) almost impossible. Hope i'm not missing anything here. Please let us know your thoughts Thanks, Joseph On 8/30/07, Ted Husted <[EMAIL PROTECTED] > wrote: > > 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] > >