Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As already mentioned on wicket-users mailing list (http://markmail.org/message/w2ynmeguy6szk3uf), I think the current implementation of wicket-select2 in not usable because of commit 1f7aaeb (non-ajax support):
First of all, I think there is no need for a non-ajax wicket-select2 component: if you need a non-ajax select2, simply use a DropDownChoice (or hidden textfield for multichoice) and init select2 directly using Javascript only (select2.js). I could provide a Behavior that handles the JS initialization part.
The current non-ajax implementation uses an ArrayList in addition to the already existing ChoiceProvider, but this breaks the idea behind the ChoiceProvider, now there are two separate ways to provide choices, which is very confusing. Also, users are forced to provide the (static) list of (non-ajax) choices (else the constructor throws exceptions), although they might not be interested in a non-ajax behavior.
If the PR is accepted I will also merge it to the wicket-6.x branch and see what else needs to be merged.