tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Zeigler (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (TAP5-692) T5 should pick up validators to be applied to a field from the containing component's .properties file.
Date Mon, 11 May 2009 18:33:45 GMT

     [ https://issues.apache.org/jira/browse/TAP5-692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Robert Zeigler reassigned TAP5-692:

    Assignee: Robert Zeigler

> T5 should pick up validators to be applied to a field from the containing component's
.properties file.
> -------------------------------------------------------------------------------------------------------
>                 Key: TAP5-692
>                 URL: https://issues.apache.org/jira/browse/TAP5-692
>             Project: Tapestry 5
>          Issue Type: New Feature
>          Components: tapestry-core
>            Reporter: Robert Zeigler
>            Assignee: Robert Zeigler
>            Priority: Minor
> Currently, there are two core-supported methods for specifying the validators to be applied
to a particular form field: the @Validator annotation, and the validate attribute.  Tapestry
supports, however, specifying constraints to a specific validator in the .properties file.
For instance: 
>   <t:textfield t:id="someField" validate="regexp">
> Could have an entry in the .properties file such as:
>   someField-regexp=^\d+$
>   someField-regexp-message=You must input a number for someField
> What would be equally nice is to be able to specify the actually regexp validator as
a constraint in the .properties file:
>   someField-validators=regexp
> Or
>   someField-validators=required,regexp
> This would be helpful for using, eg, BeanEditForm, where you might want to specify the
constraints for a large number of fields, don't want to provide parameters for each of those
fields, and you don't have access to the source to add @Validator to each of the properties.
> This will probably take the form of a new ValidationConstraintGenerator, but there may
be some additional "plumbing" involved to get access to the containing page/component's message

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message