[
https://issues.apache.org/jira/browse/WICKET-4590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Grant updated WICKET-4590:
-------------------------------
Attachment: WICKET-4590-palette-quickstart.zip
Attached a quickstart showing the problem.
> 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
> 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