You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Franck Lefebure <fl...@orange.gp> on 2003/05/19 14:55:21 UTC
RE : Indexed Properties and Validator
Hi,
I had a look to this example, but it's some different of what I need
Client side validation isn't done in this case on Indexed property.
What I need is something like :
<form action="doAction.do">
<nested:iterate property="itemList" id="item">
<nested:text property="test"/>
</nested:iterate>
</form>
<html:javascript formName = "actionForm"/>
And I had a look to source code for my two problems (client-side
validation for indexed properties
And validation on 2 level depth indexed-properties but I think it's not
already possible
(org.apache.commons.validator.Validator,
org.apache.struts.taglibs.JavascriptValidatorTag)
Bye
--
Franck Lefebure
> -----Message d'origine-----
> De : Vic Cekvenich [mailto:vc@baseBeans.com]
> Envoyé : samedi 17 mai 2003 23:12
> À : struts-user@jakarta.apache.org
> Objet : Re: Indexed Properties and Validator
>
>
>
> 1st, Multi Row Validatoin (even nested) works no problem with
> JavaScript. Read some of my recent posts.
>
> Also, here is a link to a sample JSP page.... see the tag
> that includes
> the javascript in there.
>
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/
> WEB-INF/portlets/memberSec/User.jsp
>
>
> Franck Lefebure wrote:
>
> >Hello,
> >
> >my ValidatorForm looks like :
> >
> > public class InfoForm extends ValidatorForm{
> > ArrayList itemList = new ArrayList();
> > ...
> > }
> >
> >Assumed that beans in the itemList are instance of :
> >
> > Public class item{
> > String title;
> > ArrayList fooList;
> > }
> >
> >And imagine that beans in the fooList are instance of :
> >
> > Public class foo{
> > String test;
> > }
> >
> >I have 2 problems :
> >
> >1/ ------------------------------------
> >
> >If I want to do validation with the "title" property of an
> item bean, I
> >can declare in the validation.xml something like : (it's ok)
> > <field
> > property="titre"
> > indexedListProperty="itemList"
> > depends="required">
> > <arg0 key="index.titre"/>
> > </field>
> >
> >But how can I do validation on the "test" property of Foo beans I
> >tried, (I doesn't work):
> > <field
> > property="titre"
> > indexedListProperty="itemList.fooList"
> > depends="required">
> > <arg0 key="index.titre"/>
> > </field>
> >
> >2/ ---------------------------------------
> >
> >In the last exemple, is-it possible to do client-side
> validation with
> >1.1rc1 I tried, but it doesn't seem to work (the dynamic javascript
> >isn't
> >included)
> >
> >Thank for advance
> >
> >
> >--
> >Franck Lefebure
> >
> >
>
> --
> Vic Cekvenich,
> Struts Instructor,
> 1-800-917-JAVA
>
> Advanced <a href ="baseBeans.com">Struts Training</a> and
> project recovery in North East.
> Open Source <a href ="baseBeans.com">Content Management</a>
> basicPortal sofware Best practice<a href
> ="baseBeans.com">Struts Support</a> v.1.1 helper ScafflodingXPress
>
>
>
>
> ---------------------------------------------------------------------
> 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: RE : Indexed Properties and Validator
Posted by Vic Cekvenich <vc...@baseBeans.com>.
Nested multi row validation works for me.
Franck Lefebure wrote:
>Hi,
>
>I had a look to this example, but it's some different of what I need
>Client side validation isn't done in this case on Indexed property.
>What I need is something like :
>
><form action="doAction.do">
><nested:iterate property="itemList" id="item">
><nested:text property="test"/>
></nested:iterate>
></form>
><html:javascript formName = "actionForm"/>
>
>And I had a look to source code for my two problems (client-side
>validation for indexed properties
>And validation on 2 level depth indexed-properties but I think it's not
>already possible
>
>(org.apache.commons.validator.Validator,
>org.apache.struts.taglibs.JavascriptValidatorTag)
>
>Bye
>
>--
>Franck Lefebure
>
>
>
>
>>-----Message d'origine-----
>>De : Vic Cekvenich [mailto:vc@baseBeans.com]
>>Envoyé : samedi 17 mai 2003 23:12
>>À : struts-user@jakarta.apache.org
>>Objet : Re: Indexed Properties and Validator
>>
>>
>>
>>1st, Multi Row Validatoin (even nested) works no problem with
>>JavaScript. Read some of my recent posts.
>>
>>Also, here is a link to a sample JSP page.... see the tag
>>that includes
>>the javascript in there.
>>
>>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/
>>WEB-INF/portlets/memberSec/User.jsp
>>
>>
>>Franck Lefebure wrote:
>>
>>
>>
>>>Hello,
>>>
>>>my ValidatorForm looks like :
>>>
>>> public class InfoForm extends ValidatorForm{
>>> ArrayList itemList = new ArrayList();
>>> ...
>>> }
>>>
>>>Assumed that beans in the itemList are instance of :
>>>
>>> Public class item{
>>> String title;
>>> ArrayList fooList;
>>> }
>>>
>>>And imagine that beans in the fooList are instance of :
>>>
>>> Public class foo{
>>> String test;
>>> }
>>>
>>>I have 2 problems :
>>>
>>>1/ ------------------------------------
>>>
>>>If I want to do validation with the "title" property of an
>>>
>>>
>>item bean, I
>>
>>
>>>can declare in the validation.xml something like : (it's ok)
>>> <field
>>> property="titre"
>>> indexedListProperty="itemList"
>>> depends="required">
>>> <arg0 key="index.titre"/>
>>> </field>
>>>
>>>But how can I do validation on the "test" property of Foo beans I
>>>tried, (I doesn't work):
>>> <field
>>> property="titre"
>>> indexedListProperty="itemList.fooList"
>>> depends="required">
>>> <arg0 key="index.titre"/>
>>> </field>
>>>
>>>2/ ---------------------------------------
>>>
>>>In the last exemple, is-it possible to do client-side
>>>
>>>
>>validation with
>>
>>
>>>1.1rc1 I tried, but it doesn't seem to work (the dynamic javascript
>>>isn't
>>>included)
>>>
>>>Thank for advance
>>>
>>>
>>>--
>>>Franck Lefebure
>>>
>>>
>>>
>>>
>>--
>>Vic Cekvenich,
>>Struts Instructor,
>>1-800-917-JAVA
>>
>>Advanced <a href ="baseBeans.com">Struts Training</a> and
>>project recovery in North East.
>>Open Source <a href ="baseBeans.com">Content Management</a>
>>basicPortal sofware Best practice<a href
>>="baseBeans.com">Struts Support</a> v.1.1 helper ScafflodingXPress
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>>
--
Vic Cekvenich,
Struts Instructor,
1-800-917-JAVA
Advanced <a href ="baseBeans.com">Struts Training</a> and project recovery in North East.
Open Source <a href ="baseBeans.com">Content Management</a> basicPortal sofware
Best practice<a href ="baseBeans.com">Struts Support</a> v.1.1 helper ScafflodingXPress
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org