You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2008/02/11 19:24:08 UTC

[jira] Resolved: (WICKET-1337) ListMultipleChoice doesn't work when entries are preselected

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

Igor Vaynberg resolved WICKET-1337.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

its because the list of available choices and the collection used to store the selection are the same.

instead of lmcPriority.setModelObject(priorityList);  try lmcpriority.setmodelobject(new arraylist(prioritylist));


> 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
>            Assignee: Igor Vaynberg
>
> 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.