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/04/13 09:57:14 UTC

[jira] Resolved: (WICKET-2161) DropDownChoice NO_SELECTION_VALUE static field is final

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

Juergen Donnerstag resolved WICKET-2161.
----------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.3.6)
                   1.4-RC3
         Assignee: Juergen Donnerstag

fixed. Thanks

> DropDownChoice NO_SELECTION_VALUE static field is final
> -------------------------------------------------------
>
>                 Key: WICKET-2161
>                 URL: https://issues.apache.org/jira/browse/WICKET-2161
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>            Reporter: Ulrik Hagberg
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.4-RC3
>
>
> Lets say I do this:
> List<Option> _options = getOptions();
> someRenderer = new ChoiceRenderer() {
> ...
> }
> DropDownChoice _ddc = new DropDownChoice("dropDown", new Model((Serializable) _option),options, someRenderer);
> The Option class looks like this:
> public class Option {
> private String display_name;
> private String id;
> gettersAndSetters...
> }
> If I select an Option from the DDC, and that Option has id = -1, the AbstractSingleSelectChoice#getDefaultChoice(final Object selected) will interpret my choice as the protected static final String NO_SELECTION_VALUE = "-1" in AbstractSingleSelectChoice.java.
> The result will be that the "Choose one" option is visible in the DDC.
> Shouldn't the NO_SELECTION_VALUE be customizable?

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