You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/12/15 10:56:13 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14246507#comment-14246507 ] 

ASF subversion and git services commented on WICKET-4703:
---------------------------------------------------------

Commit 776ef814244b50d34ad7547b18eb3072794c4d51 in wicket's branch refs/heads/master from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=776ef81 ]

WICKET-4703 StringResourceModel should provide an overridable getString(Component) method

Make StringResourceModel#getString(Component) overridable

(cherry picked from commit 1a5551273396d3babb79146b23e4d3afd42da3e8)


> 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
>
> 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)