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

Sven Meier resolved WICKET-4590.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.8
                   6.0.0-RC1
         Assignee: Sven Meier

Thanks.
                
> Palette does not display a single unselected item
> -------------------------------------------------
>
>                 Key: WICKET-4590
>                 URL: https://issues.apache.org/jira/browse/WICKET-4590
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.7
>            Reporter: Alex Grant
>            Assignee: Sven Meier
>             Fix For: 6.0.0-RC1, 1.5.8
>
>         Attachments: WICKET-4590-palette-quickstart.zip
>
>
> In Wicket 1.5.7, if you have a Palette where the choices model returns one 
> object and the (selected) model returns zero objects, the palette will appear 
> empty.
> I believe this was a result of the change in WICKET-4528. In the method 
> Recorder.updateIds, it used to look like this
>       private void updateIds(final String value)
>       {
>               if (Strings.isEmpty(value))
>               {
>                       ids = EMPTY_IDS;
>               }
>               else
>               {
>                       ids = value.split(",");
>               }
>       }
> Now it looks like this
>       private void updateIds(final String value)
>       {
>               getSelectedIds().clear();
>               for (final String id : Strings.split(value, ','))
>               {
>                       getSelectedIds().add(id);
>               }
>       }
> Which means that if value is "", Strings.split returns one empty string, so 
> getSelectedIds() contains one empty string, resulting in getUnselectedList() 
> deciding that the selected and choices lists are both size one and therefore 
> there is nothing available to display in the unselected list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to