[
https://issues.apache.org/jira/browse/WICKET-1654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johan Compagner reassigned WICKET-1654:
---------------------------------------
Assignee: Igor Vaynberg
is this a 1.4 thing?
i guess it will be 1.5?
And does igor wants to polute the IValidator interface with wicket specific
interfaces (IModel) ???
> Update validators to accept IModel parameter for easy override of error
> messages
> --------------------------------------------------------------------------------
>
> Key: WICKET-1654
> URL: https://issues.apache.org/jira/browse/WICKET-1654
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4-M1
> Environment: N/A
> Reporter: Will Hoover
> Assignee: Igor Vaynberg
> Priority: Minor
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Update validators to accept IModel parameter for easy override of error
> messages. Instead of looking up the resource key in "Application.properties"
> and adding to the components properties file, allow a model to be passed into
> the validators that will override the default validation error message. For
> example:
> StringResourceModel srm = new
> StringResourceModel("my.custom.stringvalidator.message", null);
> add(new TextField("fname").setLabel(new Model("first
> name")).add(StringValidator.minimum(5, srm));
> 1) This will also allow someone to pass in parameters that they want
> displayed along with the validation error message (difficult to accomplish
> when just overriding the resource key- where to pass?)
> 2) More intuitive because it uses the same concept that is applied to
> components... i.e. new TextField("id", new Model(...)) VS
> StringValidator.minimum(5, new Model(...))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.