You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alex Grant (JIRA)" <ji...@apache.org> on 2012/06/06 01:46:23 UTC
[jira] [Created] (WICKET-4590) Palette does not display a single
unselected item
Alex Grant created WICKET-4590:
----------------------------------
Summary: 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
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
[jira] [Updated] (WICKET-4590) Palette does not display a single
unselected item
Posted by "Alex Grant (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Resolved] (WICKET-4590) Palette does not display a single
unselected item
Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
[ 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