You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Janice <ja...@shaw.ca> on 2003/12/19 20:24:58 UTC
re: ClassCastException coming from DynaValidatorForm.validate()-> bug
or a feature?
I went to the source to try to find out what was causing this problem, and I
started to suspect that:
<form-property name="page"
type="java.lang.String"
initial="home" />
was the problem... sure enough, when I changed the name to "thePage",
instead of "page", it worked.
Would this be a bug or just a feature that I missed the documentation for?
Janice
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: ClassCastException coming from DynaValidatorForm.validate()-> bug or a feature?
Posted by Steve Armstrong <bi...@sympatico.ca>.
Hi,
Validator has support for validating multi-page forms via the use of an
optional "page" attribute, associated with a field element, that can be set
to an integer. From the Validator portion of the user guide:
All validation for any field on a page less than or equal to the current
page is performed server side. All validation for any field on a page equal
to the current page is generated for the client side Javascript. A
multi-part form expects the page attribute to be set
<html:hidden property="page" value="1"/>
Since your form already defines a page property, and a non-integer one at
that, I can see how things might get screwed up.
Cheers,
-Steve
-----Original Message-----
From: Janice [mailto:janice-j@shaw.ca]
Sent: Friday, December 19, 2003 2:25 PM
To: struts-user@jakarta.apache.org
Subject: re: ClassCastException coming from
DynaValidatorForm.validate()-> bug or a feature?
I went to the source to try to find out what was causing this problem, and I
started to suspect that:
<form-property name="page"
type="java.lang.String"
initial="home" />
was the problem... sure enough, when I changed the name to "thePage",
instead of "page", it worked.
Would this be a bug or just a feature that I missed the documentation for?
Janice
---------------------------------------------------------------------
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