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 2009/09/26 12:21:15 UTC
[jira] Commented: (WICKET-2428) AbstractSingleSelectChoice: custom
resource key for null option
[ https://issues.apache.org/jira/browse/WICKET-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759873#action_12759873 ]
Juergen Donnerstag commented on WICKET-2428:
--------------------------------------------
May be I don't understand it properly, but I belief we can do that already. Please see javadoc for ComponentStringResourceLoader
> AbstractSingleSelectChoice: custom resource key for null option
> ---------------------------------------------------------------
>
> Key: WICKET-2428
> URL: https://issues.apache.org/jira/browse/WICKET-2428
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.0
> Reporter: Fridolin Jackstadt
>
> Is it possible to refactor AbstractSingleSelectChoice like shown below? To be able to override getNullOptionKey would give a great value for us.
> This would allow to have the display-values of null-options in a single properties file for whole project even if ids of some choices with different null-option display-values are equal.
> protected String getNullOptionKey() {
> return getId() + ".nullValid";
> }
> if (isNullValid())
> {
> // Null is valid, so look up the value for it
> String option = getLocalizer().getStringIgnoreSettings(getNullOptionKey(), this,
> null, null);
> if (Strings.isEmpty(option))
> {
> option = getLocalizer().getString("nullValid", this, "");
> }
> ....
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.