You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Curren <pc...@cisco.com> on 2003/05/01 00:07:14 UTC
Multi-page form validator
Howdy,
Has anyone had success with the Struts rc1 Validator for multi-page forms?
My problem is that no validation is applied when I give the field
element a page attribute. If I remove the page attribute validation
happens though. There's no logging I can see of any relevance either.
An example rule I have is -
<form name="subscriberDetailsForm">
<field page="2" property="cardExpiry" depends="required,date">
<arg0 key="subscriber.card.expiry"/>
<var>
<var-name>datePattern</var-name>
<var-value>MM/yyyy</var-value>
</var>
</field>
<snip>
The associated JSP has a form element indicating the page like -
<html:hidden property="page" value="2"/>
(and it is within an <html:form>)
...and the form is a org.apache.struts.validator.DynaValidatorForm in
which I haven't explicitly configured a page property because the
javadocs indicate it's already there.
Any idea's or does anyone have an example they can give where it does work?
Cheers,
Paul C
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Multi-page form validator
Posted by Paul Curren <pc...@cisco.com>.
Thanks for the suggestion. Unfortunately, even with me declaring the
page property on my bean, the validation is not taking place.
I'm avoiding nightly builds, so I guess I'll just wait for a fix on the
next release candidate (or release! :-)
Paul C
Dennis Muhlestein wrote:
> There is a bug with DynaValidatorForm not setting the page property.
> You need to define it (As java.lang.Integer) in your struts-config.xml
>
> Also, that may be fixed in a nightly build after 1.1 rc1.
>
> Paul Curren wrote:
>
>> <div class="moz-text-flowed" style="font-family: -moz-fixed">Howdy,
>>
>> Has anyone had success with the Struts rc1 Validator for multi-page
>> forms?
>>
>> My problem is that no validation is applied when I give the field
>> element a page attribute. If I remove the page attribute validation
>> happens though. There's no logging I can see of any relevance either.
>>
>> An example rule I have is -
>>
>> <form name="subscriberDetailsForm">
>> <field page="2" property="cardExpiry" depends="required,date">
>> <arg0 key="subscriber.card.expiry"/>
>> <var>
>> <var-name>datePattern</var-name>
>> <var-value>MM/yyyy</var-value>
>> </var>
>> </field>
>> <snip>
>>
>> The associated JSP has a form element indicating the page like -
>> <html:hidden property="page" value="2"/>
>> (and it is within an <html:form>)
>>
>> ...and the form is a org.apache.struts.validator.DynaValidatorForm in
>> which I haven't explicitly configured a page property because the
>> javadocs indicate it's already there.
>>
>> Any idea's or does anyone have an example they can give where it does
>> work?
>>
>> Cheers,
>>
>> Paul C
>>
>> </div>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Multi-page form validator
Posted by Dennis Muhlestein <de...@zserve.com>.
There is a bug with DynaValidatorForm not setting the page property.
You need to define it (As java.lang.Integer) in your struts-config.xml
Also, that may be fixed in a nightly build after 1.1 rc1.
Paul Curren wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Howdy,
>
> Has anyone had success with the Struts rc1 Validator for multi-page
> forms?
>
> My problem is that no validation is applied when I give the field
> element a page attribute. If I remove the page attribute validation
> happens though. There's no logging I can see of any relevance either.
>
> An example rule I have is -
>
> <form name="subscriberDetailsForm">
> <field page="2" property="cardExpiry" depends="required,date">
> <arg0 key="subscriber.card.expiry"/>
> <var>
> <var-name>datePattern</var-name>
> <var-value>MM/yyyy</var-value>
> </var>
> </field>
> <snip>
>
> The associated JSP has a form element indicating the page like -
> <html:hidden property="page" value="2"/>
> (and it is within an <html:form>)
>
> ...and the form is a org.apache.struts.validator.DynaValidatorForm in
> which I haven't explicitly configured a page property because the
> javadocs indicate it's already there.
>
> Any idea's or does anyone have an example they can give where it does
> work?
>
> Cheers,
>
> Paul C
>
> </div>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org