ListMultipleChoice doesn't work when entries are preselected
------------------------------------------------------------

                 Key: WICKET-1337
                 URL: https://issues.apache.org/jira/browse/WICKET-1337
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.1
            Reporter: Thomas Jaeckle


I tried to preselect all entries in a ListMultipleChoice:

  List priorityList = getPriorityList();
  lmcPriority = new ListMultipleChoice("selectContent", new Model(), 
priorityList);
  lmcPriority.setModelObject(priorityList);

That works, but when I now start deselecting some items or I select just one 
item, the ListMultipleChoice has the wrong list.

For the szenarios I did a "System.out.println(getModelObject());" at the end of 
ListMultipleChoice.updateModel()
---
First szenario:

This is my list of priorities:
[very high, high, medium, low, very low]

After I deselect (with Ctrl-Key pressed) "medium" I get:
[very high, high, low, very low]
After I deselect "high" I get:
[very high, very low]
After I deselect "very high" I get:
[] (empty List)
At this time "low" and "very low" are still selected.
---
Second szenario:

This is my list of priorities:
[very high, high, medium, low, very low]
I select only "medium":
[medium]
I select only "high":
[] (empty List)
I select only "low":
[] (empty List)

At this point I can select what I want, but the list never has entries.
---

When I don't preselect all entries, everything works fine.

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

Reply via email to