You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Gonzalo Aguilar (JIRA)" <ji...@apache.org> on 2013/01/21 13:04: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=13558712#comment-13558712 ] 

Gonzalo Aguilar commented on WICKET-4703:
-----------------------------------------

I just need the UnresolvedIgnoringStringResourceModel class. 

I have exactly the problem you are describing. and is a mess to have the substitutions laying around.
It would be nicer if the StringResourceModel could be parametrised to allow the behavior of UnresolvedIgnoringStringResourceModel.

Something like .setAllowIgnoreKey(false) --> Will force the class substitute every parameter with the empty string.

Thank you.
                
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira