You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dewitte Rémi <re...@gide.net> on 2005/08/02 20:14:05 UTC
validator question
Hi !
In a wizard, I have some "required" checks with struts-validator assigned to
pages (with page=).
There is sometimes a "jump" in the wizard so that a property is null. When
validating the page after the jump, the server-side validation failed as if
validator checked all previous pages.
For example,
page1 -> property q1
page2 -> property q2
page3 -> property q3
If i jump from page1 to page3, submitting page3 will failed telling q2 is
required (because null).
Can you confirm that the validator ckecks all properties for pages <= current
page ?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: validator question
Posted by Dewitte Rémi <re...@gide.net>.
Le Mardi 2 Août 2005 20:14, Dewitte Rémi a écrit :
> Hi !
> In a wizard, I have some "required" checks with struts-validator assigned
> to pages (with page=).
> There is sometimes a "jump" in the wizard so that a property is null. When
> validating the page after the jump, the server-side validation failed as if
> validator checked all previous pages.
> For example,
> page1 -> property q1
> page2 -> property q2
> page3 -> property q3
> If i jump from page1 to page3, submitting page3 will failed telling q2 is
> required (because null).
>
> Can you confirm that the validator ckecks all properties for pages <=
> current page ?
Answer to myself : yes
From validator src :
/**
* Gets the page. This in conjunction with the page property of
* a <code>Field<code> can control the processing of fields. If the
field's
* page is less than or equal to this page value, it will be processed.
*/
public int getPage() {
return page;
}
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org