You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stephan Schröder <si...@gmx.de> on 2008/10/09 15:13:40 UTC

DefaultWorkflowInterceptor doesn't validate anymore!?

Hi,

i'm using Struts2.1.2 which uses Xwork2.1.2. When i tried to figure out why
my validate-Method wasn't called anymore, i found out that the
DefaultWorkflowInterceptor just doesn't invoke it anymore, which seems to be
on purpose (<-b->This interceptor does not perform any validation<-/b->.)
Which interceptor is now responsible for calling validate?

regards,
Stephan

http://www.nabble.com/file/p19898306/DefaultWorkflowInterceptor.java
DefaultWorkflowInterceptor.java 


-- 
View this message in context: http://www.nabble.com/DefaultWorkflowInterceptor-doesn%27t-validate-anymore%21--tp19898306p19898306.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: DefaultWorkflowInterceptor doesn't validate anymore!?

Posted by Musachy Barroso <mu...@gmail.com>.
The logic that was in the workflow interceptor was copy/pasted to the
validation interceptor, I don't think the semantic changed. Take a look at:

https://svn.opensymphony.com/svn/xwork/trunk/src/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java

musachy

On Thu, Oct 9, 2008 at 10:55 AM, Stephan Schröder <si...@gmx.de> wrote:

>
> >The validation one
>
> Ok, but this seems to have a different semantic compared to the old
> workflow-interceptor:
>
>  * <li>alwaysInvokeValidate - Defaults to true. If true validate() method
> will always
>  * be invoked, otherwise it will not.</li>
>  *
>  * <li>programmatic - Defaults to true. If true and the action is
> Validateable call validate(),
>  * and any method that starts with "validate".
>  * </li>
>
> 1)What if my Action class has two "execute"-Methods (login and register)
> und
> therefore a validateLogin and
> validateRegister-method. 'workflow' was able two execute only the
> appropriate validation-methode while
> 'validation' will call "any method that starts with "validate"".
>
> 2)Also strange if alwaysInvokeValidate is false and programmatic is true:
> doesn't the resulting "validate() method will not (always?) be invoked" and
> the "If true and the action is Validateable call validate()" contradict
> itself?
>
> 3) If booth are true, is validate() called twice?
>
> Regards,
> Stephan
>
>
>
>
> Musachy Barroso wrote:
> >
> > The validation one.
> >
> > On Thu, Oct 9, 2008 at 9:13 AM, Stephan Schröder <si...@gmx.de>
> > wrote:
> >
> >>
> >> Hi,
> >>
> >> i'm using Struts2.1.2 which uses Xwork2.1.2. When i tried to figure out
> >> why
> >> my validate-Method wasn't called anymore, i found out that the
> >> DefaultWorkflowInterceptor just doesn't invoke it anymore, which seems
> to
> >> be
> >> on purpose (<-b->This interceptor does not perform any
> validation<-/b->.)
> >> Which interceptor is now responsible for calling validate?
> >>
> >> regards,
> >> Stephan
> >>
> >> http://www.nabble.com/file/p19898306/DefaultWorkflowInterceptor.java
> >> DefaultWorkflowInterceptor.java
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/DefaultWorkflowInterceptor-doesn%27t-validate-anymore%21--tp19898306p19898306.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/DefaultWorkflowInterceptor-doesn%27t-validate-anymore%21--tp19898306p19900670.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: DefaultWorkflowInterceptor doesn't validate anymore!?

Posted by Stephan Schröder <si...@gmx.de>.
>The validation one

Ok, but this seems to have a different semantic compared to the old
workflow-interceptor:

 * <li>alwaysInvokeValidate - Defaults to true. If true validate() method
will always
 * be invoked, otherwise it will not.</li>
 *
 * <li>programmatic - Defaults to true. If true and the action is
Validateable call validate(),
 * and any method that starts with "validate".
 * </li>

1)What if my Action class has two "execute"-Methods (login and register) und
therefore a validateLogin and
validateRegister-method. 'workflow' was able two execute only the
appropriate validation-methode while 
'validation' will call "any method that starts with "validate"".

2)Also strange if alwaysInvokeValidate is false and programmatic is true:
doesn't the resulting "validate() method will not (always?) be invoked" and
the "If true and the action is Validateable call validate()" contradict
itself?

3) If booth are true, is validate() called twice?

Regards,
Stephan




Musachy Barroso wrote:
> 
> The validation one.
> 
> On Thu, Oct 9, 2008 at 9:13 AM, Stephan Schröder <si...@gmx.de>
> wrote:
> 
>>
>> Hi,
>>
>> i'm using Struts2.1.2 which uses Xwork2.1.2. When i tried to figure out
>> why
>> my validate-Method wasn't called anymore, i found out that the
>> DefaultWorkflowInterceptor just doesn't invoke it anymore, which seems to
>> be
>> on purpose (<-b->This interceptor does not perform any validation<-/b->.)
>> Which interceptor is now responsible for calling validate?
>>
>> regards,
>> Stephan
>>
>> http://www.nabble.com/file/p19898306/DefaultWorkflowInterceptor.java
>> DefaultWorkflowInterceptor.java
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/DefaultWorkflowInterceptor-doesn%27t-validate-anymore%21--tp19898306p19898306.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> 

-- 
View this message in context: http://www.nabble.com/DefaultWorkflowInterceptor-doesn%27t-validate-anymore%21--tp19898306p19900670.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: DefaultWorkflowInterceptor doesn't validate anymore!?

Posted by Musachy Barroso <mu...@gmail.com>.
The validation one.

On Thu, Oct 9, 2008 at 9:13 AM, Stephan Schröder <si...@gmx.de> wrote:

>
> Hi,
>
> i'm using Struts2.1.2 which uses Xwork2.1.2. When i tried to figure out why
> my validate-Method wasn't called anymore, i found out that the
> DefaultWorkflowInterceptor just doesn't invoke it anymore, which seems to
> be
> on purpose (<-b->This interceptor does not perform any validation<-/b->.)
> Which interceptor is now responsible for calling validate?
>
> regards,
> Stephan
>
> http://www.nabble.com/file/p19898306/DefaultWorkflowInterceptor.java
> DefaultWorkflowInterceptor.java
>
>
> --
> View this message in context:
> http://www.nabble.com/DefaultWorkflowInterceptor-doesn%27t-validate-anymore%21--tp19898306p19898306.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd