You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tonnis Wildeboer <yo...@yahoo.com> on 2006/05/05 17:37:15 UTC
Validator - Wildcards for Indexed Properties?
We use fairly complex Struts ActionForms that include tables generated from indexed properties returning beans. We don't know how many elements the indexed property will have. (i.e. We don't know how many rows the table will have.) So the question is, how do I describe the field properties generally for the properties of beans accessed through an indexed property? I would like to be able to do something like this:
<field property="beanAPropA.indexedPropA[].beanBPropA"
depends="required,float">
<arg0 key="beanAPropA.indexedPropA.beanBPropA.displayname"/>
</field>
Note that I am not providing an index for the indexed property. Will that work? Or can I put in wildcard character instead of the index position?
Thanks in advance,
tdub
---------------------------------
Yahoo! Mail goes everywhere you do. Get it on your phone.
Re: Validator - Wildcards for Indexed Properties?
Posted by Niall Pemberton <ni...@gmail.com>.
Validator's handling of indexed properties isn't optimal - it only
handles one level thru' the use of the "indexedListProperty"
attribute. In the example you give you should be able to do something
like the following:
<field indexedListProperty="beanAPropA.indexedPropA"
property="beanBPropA"
depends="required,float">
<arg0 key="beanAPropA.indexedPropA.beanBPropA.displayname"/>
</field>
Niall
On 5/5/06, Tonnis Wildeboer <yo...@yahoo.com> wrote:
> We use fairly complex Struts ActionForms that include tables generated from indexed properties returning beans. We don't know how many elements the indexed property will have. (i.e. We don't know how many rows the table will have.) So the question is, how do I describe the field properties generally for the properties of beans accessed through an indexed property? I would like to be able to do something like this:
>
> <field property="beanAPropA.indexedPropA[].beanBPropA"
> depends="required,float">
> <arg0 key="beanAPropA.indexedPropA.beanBPropA.displayname"/>
> </field>
>
> Note that I am not providing an index for the indexed property. Will that work? Or can I put in wildcard character instead of the index position?
>
> Thanks in advance,
>
> tdub
>
>
> ---------------------------------
> Yahoo! Mail goes everywhere you do. Get it on your phone.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org