That is exactly what I want to avoid. I don't always want to write
validate="false" in struts-config.xml. I would like to have the value false to
be the default. And I still want to provide a validate() method in the form
bean, because from some actions I would like to have it validated.
Katarina Nelson wrote:
>
> Just write you own validate() method (with no values) in your form bean.
> Then your own method overwrites the super class? validate method.
>
> Or just write "validate=false" in your struts-config.xml file for the
> corresponding action
> e.g.:
> <action path="/saveUser"
> type="com.myAction"
> name="myForm"
> scope="session"
> validate="false"
> input="/xxx.jsp">.
>
> /Katarina
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Matthias Bauer
> Sent: den 27 mars 2001 15:11
> To: [EMAIL PROTECTED]
> Subject: validate attribute in ActionMapping
>
> Hi everybody,
>
> I am trying to set the default value for validate in the ActionMapping class
> to
> false. So I subclassed ActionMapping and did this in the constructor:
>
> public ApplicationMapping()
> {
> super();
> setValidate(false);
> }
>
> The constructor gets called (verified that with traces), but when an action
> is
> excuted, validate is set to true. I looked in the struts code but didn't
> find
> the place where this could happen.
>
> Does anybody have an idea what is going on here?
>
> Thanks,
>
> --- Matthias