You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2008/12/20 23:05:44 UTC

[jira] Resolved: (WICKET-1851) Default lookup keys don't work when UseDefaultOnMissingResource is false

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

Juergen Donnerstag resolved WICKET-1851.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-RC2
         Assignee: Juergen Donnerstag

extracted method getStringIgnoreSettings() to allow for such scenarios

> Default lookup keys don't work when UseDefaultOnMissingResource is false
> ------------------------------------------------------------------------
>
>                 Key: WICKET-1851
>                 URL: https://issues.apache.org/jira/browse/WICKET-1851
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>            Reporter: Matthias Keller
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-RC2
>
>
> When in Application the following is set:
> getResourceSettings().setThrowExceptionOnMissingResource(false);
> getResourceSettings().setUseDefaultOnMissingResource(false);
> then a noisy but very visible message is displayed for every missing resource. Unfortunately, calls to  getLocalizer().getString() then return this warning message instead of the often used default "" for which it is being checked afterwards. This leads to the effect that this warning message is considered a valid value.
> Example:
> org.apache.wicket.markup.html.form.AbstractSingleSelectChoice -> getDefaultChoice(final Object selected)
> There's this code:
> String option = getLocalizer().getString(getId() + ".null", this, "");
> if (Strings.isEmpty(option)) {
> 	option = getLocalizer().getString("null", this, CHOOSE_ONE);
> }
> With the above settings, the 'null' property is NEVER found, as the first call already returns the message "[Warning: String resource for 'form.field.null' not found]", which is not empty.
> The expected behaviour though would be to also try to lookup the 'null' value.
> This seems to apply to other classes as well as I for example never got the global  Required  property to work as each  form.field.Required  property returns the error message....

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