Martin Grigorov created WICKET-5470:
---------------------------------------
Summary: Remove 'final' from
org.apache.wicket.markup.html.form.EnumChoiceRenderer#getDisplayValue
Key: WICKET-5470
URL: https://issues.apache.org/jira/browse/WICKET-5470
Project: Wicket
Issue Type: Improvement
Components: wicket
Affects Versions: 6.13.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
Priority: Minor
org.apache.wicket.markup.html.form.EnumChoiceRenderer#getDisplayValue() adds
unnecessary indirection by providing overrideable #postprocess() method.
If an application doesn't want to use the default implementation to resolve a
display value by using i18n resources then it should provide its own custom
implementation of IChoiceRenderer because
org.apache.wicket.markup.html.form.EnumChoiceRenderer#getDisplayValue is final
and it will throw MissingResourceException.
If an application needs to use different logic it should be able to override
#getDisplayValue(). If it needs to do something like #postprocess() then it can
do:
public Object getDisplayValue() {
Object orig = super.getDisplayValue();
return manipulate(orig);
}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)