You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Fridolin Jackstadt (JIRA)" <ji...@apache.org> on 2009/08/19 10:34:14 UTC
[jira] Updated: (WICKET-2428) AbstractSingleSelectChoice: custom
resource key for null option
[ https://issues.apache.org/jira/browse/WICKET-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fridolin Jackstadt updated WICKET-2428:
---------------------------------------
Description:
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, "");
}
....
was:
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 singel 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, "");
}
....
> 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.