Skip to content

StringTextChoiceProvider forcing to override toChoices #24

tszpinda opened this Issue Oct 3, 2012 · 3 comments

3 participants

tszpinda commented Oct 3, 2012

If not overridden with something like:

public Collection<String> toChoices(Collection<String> ids)
    return new ArrayList<String>(super.toChoices(ids));

will throw exception:

at java.util.AbstractList.remove(
at java.util.AbstractList$Itr.remove(
at java.util.AbstractList.removeRange(
at java.util.AbstractList.clear(
at com.vaynberg.wicket.select2.Select2MultiChoice.updateModel(

tgoetz commented Oct 4, 2012

Could this be related to issue #25? Or when exactly do you get this error, do you have some example code?

tszpinda commented Oct 4, 2012

Problem occurs when I try to remove an item from multi-select menu and its caused by:

and line:

    choices = getProvider().toChoices(Arrays.asList(input.split(",")));

cause Arrays.asList returns read-only list.

tgoetz commented Dec 13, 2012

I cannot reproduce this (quickstart here:, might have been fixed already by #25.

@ivaynberg ivaynberg closed this Dec 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.