I'm not sure how that's related. --- On Tue, 8/12/08, Martin Gainty <[EMAIL PROTECTED]> wrote: > yes the validator will short-circuit when the validator's > short-circuit="true" e.g. > <validators> > <!-- Field Validators for email field --> > <field name="email"> > <field-validator type="required" short-circuit="true"> > > http://struts.apache.org/2.x/docs/validation.html#Validation-ShortCircuitingValidator > > > From: [EMAIL PROTECTED] > > > > Good catch Pierre. It appeared to be working as is, > but for cleanliness, I swapped them. > > Unfortunately that's not the problem. > > > > I did find one other error in my struts.xml though. > > I was missing the chain interceptor in my stack. > > Ex. > > <interceptor-stack > name="interceptorStack"> > > <interceptor-ref > name="validationWorkflowStack" /> > > <interceptor-ref > name="chain"/> > > > > Another important thing was to put "chain" > after "validationWorkflowStack". > > If "chain" is first, it will copy > actionErrors to the chained action, then the validation on > the list() method will fail. > > That gives you the right error message, but also > bypasses running list()... > > > > Anyway, this appears to be working now. > > (I suspect that if validation on list() really does > fail it will not make it to "chain". So this is > still not a "perfect" solution.) > > > > -----Original Message----- > > From: Pierre Thibaudeau > [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 12, 2008 2:44 PM > > To: Struts Users Mailing List > > Subject: Re: Best practice for passing success/error > message to another dispatch (struts2)? > > > > This may be completely incidental to your problem, > but, it seems to me that, > > if your actions are listed in that order, the first > one will catch the > > occurrences of the second one. > ("importRole" is a particular case of > > "*Role".) Shouldn't they be listed in > the reverse order? > > > > > > > > Example struts.xml: > > > > <action name="*Role" > class="RoleAction" method="list"> > > > > <result > name="input">/list.page</result> > > > > <result > name="success">/list.page</result> > > > > </action> > > > > > > > > <action name="importRole" > class="RoleAction" method="import"> > > > > <result name="input" > type="chain">listRole</result> > > > > <result name="success" > type="chain">listRole</result> > > > > </action> > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > _________________________________________________________________ > Get Windows Live and get whatever you need, wherever you > are. Start here. > http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]