简体   繁体   中英

Pretty javascript multiselect widget suitable for Spring Roo / Web MVC project?

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:

  1. 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.
  2. 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 completely against adding other libraries.
  3. 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="..."> \n    <input>... \n</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 eg Spring binding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM