commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (VALIDATOR-133) [validator] Indexed properties as arg0-arg3
Date Wed, 19 Jul 2006 13:22:30 GMT
     [ http://issues.apache.org/jira/browse/VALIDATOR-133?page=all ]

Niall Pemberton updated VALIDATOR-133:
--------------------------------------

    Component/s: Framework

> [validator] Indexed properties as arg0-arg3
> -------------------------------------------
>
>                 Key: VALIDATOR-133
>                 URL: http://issues.apache.org/jira/browse/VALIDATOR-133
>             Project: Commons Validator
>          Issue Type: Improvement
>          Components: Framework
>         Environment: Operating System: All
> Platform: All
>            Reporter: Jim Prantzalos
>            Priority: Minor
>
> I entered something similar to this as a feature enhancement to the Struts
> validator prior to figuring out that this is really a commons-validator
> enhancement request. (See also I entered something similar to this as a feature enhancement
to the Struts
> validator prior to figuring out that this is really a commons-validator
> enhancement request. (See also Bug #23351).
> The basic problem is, when working with forms that contain indexed properties,
> how do I use the validator to generate meaningful error messages, such as:
> "Employment #2: must specify a start date for primary employer 'Motown Music'."
> My recommendation is:
> 1) Add a 'property' attribute to arg0-3 such that I can use the indexed
> properties as parameters to my messages.
> Example:
> <arg1 property="emps[].employerName"/>
> 2) Add an 'index' literal such that I can pass the current index as a 
> parameter to my messages.
> Example:
> <arg1 property="[].index"/> or <arg1 property="*index*"/>
> Whatever literal is used, it would also be nice to have it available in
> <var-value>. Used together with 'validwhen' it would be very helpful.
> Example:
> <field property="startDate" indexedListProperty="emps" depends="validwhen">
> ...
>   <var-value>((*index* != '0') or (*this* != null))</var-value>
> ...
> -jim).
> The basic problem is, when working with forms that contain indexed properties,
> how do I use the validator to generate meaningful error messages, such as:
> "Employment #2: must specify a start date for primary employer 'Motown Music'."
> My recommendation is:
> 1) Add a 'property' attribute to arg0-3 such that I can use the indexed
> properties as parameters to my messages.
> Example:
> <arg1 property="emps[].employerName"/>
> 2) Add an 'index' literal such that I can pass the current index as a 
> parameter to my messages.
> Example:
> <arg1 property="[].index"/> or <arg1 property="*index*"/>
> Whatever literal is used, it would also be nice to have it available in
> <var-value>. Used together with 'validwhen' it would be very helpful.
> Example:
> <field property="startDate" indexedListProperty="emps" depends="validwhen">
> ...
>   <var-value>((*index* != '0') or (*this* != null))</var-value>
> ...
> -jim

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message