You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Reynaldo Timonera <re...@worldnet.att.net> on 2002/04/20 15:14:12 UTC
How do I disable struts-validator on first call using the do
Hi All,
We're using the struts-validator and it's great.
We have one problem: when the page is called through the do (/transferUtitlity.do), the validator fires and displays the error. We wanted on the first call to the page that the validator will be disabled.
Thanks for your help,
Reynaldo
Re: How do I disable struts-validator on first call using the do
Posted by Reynaldo Timonera <re...@worldnet.att.net>.
I'm using session forms.
I did some code to solve this problem, though I'm not sure if this is the
best way:
Before forwarding to the next page this code sets the mapping validate of
the next page to false and then I just turn on validate in the next page's
action class.
//Disable validation of the next page so that validator
won't activate the first
//time the page is accessed.
String nextStrPath =
mapping.findForward(nextPage).getPath();
nextStrPath =
nextStrPath.substring(0,nextStrPath.indexOf(".do"));
mapping.getMappings().findMapping(nextStrPath).setValidate(false);
Thanks,
Reynaldo
----- Original Message -----
From: "Don Saxton" <ds...@pacbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Sunday, April 21, 2002 1:59 AM
Subject: Re: How do I disable struts-validator on first call using the do
> I thought this occurs on session forms but not request. does your case
> disprove that?
>
> ----- Original Message -----
> From: "Reynaldo Timonera" <re...@worldnet.att.net>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Saturday, April 20, 2002 6:14 AM
> Subject: How do I disable struts-validator on first call using the do
>
>
> Hi All,
>
> We're using the struts-validator and it's great.
>
> We have one problem: when the page is called through the do
> (/transferUtitlity.do), the validator fires and displays the error. We
> wanted on the first call to the page that the validator will be disabled.
>
> Thanks for your help,
>
> Reynaldo
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How do I disable struts-validator on first call using the do
Posted by Don Saxton <ds...@pacbell.net>.
I thought this occurs on session forms but not request. does your case
disprove that?
----- Original Message -----
From: "Reynaldo Timonera" <re...@worldnet.att.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Saturday, April 20, 2002 6:14 AM
Subject: How do I disable struts-validator on first call using the do
Hi All,
We're using the struts-validator and it's great.
We have one problem: when the page is called through the do
(/transferUtitlity.do), the validator fires and displays the error. We
wanted on the first call to the page that the validator will be disabled.
Thanks for your help,
Reynaldo
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>