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/12/15 10:57:14 UTC

[jira] [Resolved] (WICKET-4703) StringResourceModel should provide an overridable getString(Component) method

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

Martin Grigorov resolved WICKET-4703.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 6.19.0
                   7.0.0-M5
         Assignee: Martin Grigorov

Made StringResourceModel#getSttring(Component) with 'protected' visibiliy

> StringResourceModel should provide an overridable getString(Component) method
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-4703
>                 URL: https://issues.apache.org/jira/browse/WICKET-4703
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.7
>            Reporter: Matthias Keller
>            Assignee: Martin Grigorov
>             Fix For: 7.0.0-M5, 6.19.0
>
>
> String ResourceModel is not really subclassable to provide additional logic (for example return an empty string if not all properties could be evaluated etc).
> Normally, any LDM can be subclassed an it's load() method overridden which does not work here in most cases since the model is wrapped internally and if the SRM was not constructed with an explicit component (but attached later to a component), the load() method of the STM is never evaluated since the AssignmentWrapper calls getString(Component) directly.
> This method should be overridable in some way and the javadoc on load() amended to inform programmers that overriding this method will not always lead to the desired goal.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)