You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ryan Crumley (JIRA)" <ji...@apache.org> on 2007/05/03 20:51:15 UTC

[jira] Created: (WICKET-528) StringResourceModel does not use defaultValue properly

StringResourceModel does not use defaultValue properly
------------------------------------------------------

                 Key: WICKET-528
                 URL: https://issues.apache.org/jira/browse/WICKET-528
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.2.6
            Reporter: Ryan Crumley
            Priority: Minor
         Attachments: stringresourcemodel.patch

The construction in StringResourceModel that takes an argument 'defaultValue' does not pass it to Localizer.getString (called from StringResourceModel.getString()) so the default value never has the opportunity to be used.

In addition Localizer.getString(...) did not substitute property expressions if the specified key was not found and defaultValue was used instead. 
@see
	public String getString(final String key, final Component component, final IModel model,
			final Locale locale, final String style, final String defaultValue)
			throws MissingResourceException

This was a problem for me because I wanted my default value to be provided by the model (instead of being resolved statically at construction time) so I passed the string "${modelValue}" as my default value.

The provided patch fixes both these issues in 1.2.6.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-528) StringResourceModel does not use defaultValue properly

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-528.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3
         Assignee: Juergen Donnerstag

fixed

> StringResourceModel does not use defaultValue properly
> ------------------------------------------------------
>
>                 Key: WICKET-528
>                 URL: https://issues.apache.org/jira/browse/WICKET-528
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.6
>            Reporter: Ryan Crumley
>         Assigned To: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: stringresourcemodel.patch
>
>
> The construction in StringResourceModel that takes an argument 'defaultValue' does not pass it to Localizer.getString (called from StringResourceModel.getString()) so the default value never has the opportunity to be used.
> In addition Localizer.getString(...) did not substitute property expressions if the specified key was not found and defaultValue was used instead. 
> @see
> 	public String getString(final String key, final Component component, final IModel model,
> 			final Locale locale, final String style, final String defaultValue)
> 			throws MissingResourceException
> This was a problem for me because I wanted my default value to be provided by the model (instead of being resolved statically at construction time) so I passed the string "${modelValue}" as my default value.
> The provided patch fixes both these issues in 1.2.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-528) StringResourceModel does not use defaultValue properly

Posted by "Ryan Crumley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Crumley updated WICKET-528:
--------------------------------

    Attachment: stringresourcemodel.patch

Patch to solve both issues.

> StringResourceModel does not use defaultValue properly
> ------------------------------------------------------
>
>                 Key: WICKET-528
>                 URL: https://issues.apache.org/jira/browse/WICKET-528
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.6
>            Reporter: Ryan Crumley
>            Priority: Minor
>         Attachments: stringresourcemodel.patch
>
>
> The construction in StringResourceModel that takes an argument 'defaultValue' does not pass it to Localizer.getString (called from StringResourceModel.getString()) so the default value never has the opportunity to be used.
> In addition Localizer.getString(...) did not substitute property expressions if the specified key was not found and defaultValue was used instead. 
> @see
> 	public String getString(final String key, final Component component, final IModel model,
> 			final Locale locale, final String style, final String defaultValue)
> 			throws MissingResourceException
> This was a problem for me because I wanted my default value to be provided by the model (instead of being resolved statically at construction time) so I passed the string "${modelValue}" as my default value.
> The provided patch fixes both these issues in 1.2.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.