I'm looking for a Javascript multiselect to use on my Spring Roo / Web MVC project, and worried that I could spend a while adding a widget from a library that then breaks other stuff. Requirements:
- Prettier and more functional than the standard Dojo multiselect which Roo uses when scaffolding ManyToMany relationships, ie the user shouldn't have to hold down ctrl or shift to select more than one item.
- Plays nicely with the javascript that is already used in the Roo scaffolding - so I guess that means first prize is something built on top of Dojo, although I'm not c开发者_运维技巧ompletely against adding other libraries.
- Relatively self-contained... the less of my own javascript lying around, the better.
I'm aware that there are different styles of multiselect widget, eg an "available" list and a "selected" list vs a single list with select/deselect checkboxes vs autocomplete combobox... I'm open to any - it just has to be better than what I get for free with Roo.
Have you looked in dojox.form? Does CheckedMultiSelect help?
I know this is a bit late in the game as you may have finished your project, but for future, I had problems with multiSelect widgets as those I was testing were modifying DOM so
<select multiple="multiple"> <option>...</option> .... </select>was effectively changed to something different like
<div id="..."> <input>... </div>
I found one widget which works differently: it hides original select and creates its' own element and when user selects or deselects element it syncs its' state with original select.
It is called dropdown-check-list and here is the link dropdown-check-list
This way you can use original select for e.g. Spring binding.
精彩评论