You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/01/13 10:19:55 UTC

[jira] [Resolved] (WICKET-5470) Remove 'final' from org.apache.wicket.markup.html.form.EnumChoiceRenderer#getDisplayValue

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

Martin Grigorov resolved WICKET-5470.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 7.0.0
                   6.14.0

Deprecated #postprocess() in 6.x and removed it completely in 7.x.
>From now on #getDisplayValue() is not final.

> 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
>             Fix For: 6.14.0, 7.0.0
>
>
> 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)