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

HTH
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> From: [EMAIL PROTECTED]
> To: user@struts.apache.org
> Date: Tue, 12 Aug 2008 18:56:23 -0400
> Subject: RE: Best practice for passing success/error message to another 
> dispatch (struts2)?
> 
> 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

Reply via email to