You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Amin Lalji <am...@intelysis.com> on 2004/04/30 14:40:28 UTC
RE:[SOLVED] Indexed Properties Validation
For anybody who might be interested in a solution:
After some considerable research and wheel spinning, I was able to
implement some level of validation for using the validator and
DynaValidatorForms ... the solution at this time is only stable for
client side (javascript) validation...
I obtained a copy of Vic Cekvenich's MultiRowValidator implementation
(http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg19122.html)
and used that to come up with a workaround....
Server-side caveat:
Within the MultiRowValidator, Vic casts the object (bean) passed to the
validation as a Collection... from my tests, the object being passed ends up
being a DynaValidatorForm instead of a Collection... and thus we end up with
A Classcast Exception... hence I stuck to the javascript validation which
works well...
Possible solution ...
Rewrite the implementation to cast the object to a DynaValidatorForm, and
then look up the collection from there...
Hope this helps some of you....
/A
-----Original Message-----
From: Amin Lalji [mailto:amin.lalji@intelysis.com]
Sent: Thursday, April 29, 2004 12:09 PM
To: 'Struts Users Mailing List'
Subject: Indexed Properties Validation
Hey All,
I am trying to perform client side validation of my form using the Validator
Framework... I have set up my forms as required and do see the javascript
and rules imported into my page... problem is I ended up with empty methods
which cause validation to be skipped/pass...
function DateValidations () {
}
My validation.xml entry:
<field
property="startDate"
indexedListProperty="verification"
depends="date">
<arg0 key="hr.startDate"/>
</field>
Are there any workarounds to this situation?
Thanks,
/A
---------------------------------------------------------------------
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
Re: [SOLVED] Indexed Properties Validation - SF/SV Struts presntation
next week
Posted by Vic Cekvenich <ce...@portalvu.com>.
James Turner also has a way of doing multi row validation, but I think
bellow is a better approach.
FYI, I am doing another seminar in SF next week, linked bellow and
release a few more Struts web apps, I linked a very big ones from the
link bellow. I will try to keep my “blog” updated:
http://jroller.com/page/netsql2/20040430#more_struts_sites
This way I spam the list less.
Also, I will post my trainings on here:
http://groups.yahoo.com/group/RIA_CMS/links
.V
Amin Lalji wrote:
> For anybody who might be interested in a solution:
>
> After some considerable research and wheel spinning, I was able to
> implement some level of validation for using the validator and
> DynaValidatorForms ... the solution at this time is only stable for
> client side (javascript) validation...
>
>
> I obtained a copy of Vic Cekvenich's MultiRowValidator implementation
> (http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg19122.html)
>
> and used that to come up with a workaround....
>
>
> Server-side caveat:
> Within the MultiRowValidator, Vic casts the object (bean) passed to the
> validation as a Collection... from my tests, the object being passed ends up
> being a DynaValidatorForm instead of a Collection... and thus we end up with
>
> A Classcast Exception... hence I stuck to the javascript validation which
> works well...
>
> Possible solution ...
>
> Rewrite the implementation to cast the object to a DynaValidatorForm, and
> then look up the collection from there...
>
> Hope this helps some of you....
>
> /A
>
>
>
> -----Original Message-----
> From: Amin Lalji [mailto:amin.lalji@intelysis.com]
> Sent: Thursday, April 29, 2004 12:09 PM
> To: 'Struts Users Mailing List'
> Subject: Indexed Properties Validation
>
> Hey All,
>
> I am trying to perform client side validation of my form using the Validator
> Framework... I have set up my forms as required and do see the javascript
> and rules imported into my page... problem is I ended up with empty methods
> which cause validation to be skipped/pass...
>
> function DateValidations () {
> }
>
>
> My validation.xml entry:
>
> <field
> property="startDate"
> indexedListProperty="verification"
> depends="date">
> <arg0 key="hr.startDate"/>
> </field>
>
> Are there any workarounds to this situation?
>
> Thanks,
>
> /A
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
--
Vic Cekvenich
Development Engineer
Struts Portal / RIA CMS <http://www.baseBeans.com>
NYC/Silicon Valley
cell: 917 825 3035
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org