You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vincent <vi...@xaymaca.com> on 2005/05/11 21:10:14 UTC

NestedLazy Validation

I am having a lot of fun using nested lazyforms as
described here: 
http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html#section4
I've run into an issue though where I'm finding it hard
to validate them, though.

in the JSP I'm using nested:iterate to display a bunch of them.
when I get them back in a post they look like:
nestedForm[0].myProperty
nestedForm[1].myProperty
nestedForm[2].myProperty
and so on.
Unfortunately, they don't seem to be validating on
the path key. I have  setPathValidation(true) , so I followed
previous advice and removed the leading "/" from the action path name
in the validation.xml It does not seem to be validating the nested form
properties only the overall containing form (a lazyForm).
I'm guessing I'll have to make a custom validate method for my 
nestedLazyForm?

-- 
Plato is my friend, Aristotle is my friend, but my greatest friend is truth.
- Isaac Newton

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: NestedLazy Validation: fixed

Posted by Vincent <vi...@xaymaca.com>.
Once again, Niall
Thank You.

Niall Pemberton wrote:
> Are you using the indexedListProperty in your validation.xml?
> 
> <field property="myProperty" 
>            indexedListProperty="nestedForm"
>           depends="...">
>    ....
> </field>
> 
> Niall
> 
> ----- Original Message ----- 
> From: "Vincent" <vi...@xaymaca.com>
> Sent: Wednesday, May 11, 2005 8:10 PM
> 
> 

> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


-- 
Plato is my friend, Aristotle is my friend, but my greatest friend is truth.
- Isaac Newton

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: NestedLazy Validation

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Are you using the indexedListProperty in your validation.xml?

<field property="myProperty" 
           indexedListProperty="nestedForm"
          depends="...">
   ....
</field>

Niall

----- Original Message ----- 
From: "Vincent" <vi...@xaymaca.com>
Sent: Wednesday, May 11, 2005 8:10 PM


> I am having a lot of fun using nested lazyforms as
> described here: 
> http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html#section4
> I've run into an issue though where I'm finding it hard
> to validate them, though.
> 
> in the JSP I'm using nested:iterate to display a bunch of them.
> when I get them back in a post they look like:
> nestedForm[0].myProperty
> nestedForm[1].myProperty
> nestedForm[2].myProperty
> and so on.
> Unfortunately, they don't seem to be validating on
> the path key. I have  setPathValidation(true) , so I followed
> previous advice and removed the leading "/" from the action path name
> in the validation.xml It does not seem to be validating the nested form
> properties only the overall containing form (a lazyForm).
> I'm guessing I'll have to make a custom validate method for my 
> nestedLazyForm?



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org