漂亮的 javascript 多选小部件适合 Spring Roo / Web MVC 项目吗?
我正在寻找一个 Javascript 多重选择来在我的 Spring Roo / Web MVC 项目上使用,并担心我可能会花一些时间从库中添加一个小部件,然后破坏其他东西。要求:
- 比 Roo 在搭建多对多关系时使用的标准 Dojo 多重选择更漂亮、更实用,即用户不必按住 ctrl 或 Shift 来选择多个项目。
- 与 Roo 脚手架中已经使用的 javascript 配合得很好 - 所以我猜这意味着一等奖是构建在 Dojo 之上的东西,尽管我并不完全反对添加其他库。
- 相对独立...我自己的 javascript 越少越好。
我知道有不同风格的多选小部件,例如“可用”列表和“选定”列表与带有选择/取消选择复选框的单个列表与自动完成组合框...我对任何类型都持开放态度 - 它只是有比我从 Roo 免费获得的东西更好。
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 completely 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您查看过 dojox.form 吗? CheckedMultiSelect 有帮助吗?
Have you looked in dojox.form? Does CheckedMultiSelect help?
我知道这有点晚了,因为你可能已经完成了你的项目,但对于未来,我在 multiSelect 小部件方面遇到了问题,因为我正在测试的小部件正在修改 DOM,所以
was effectively changed to something different like
我发现一个小部件的工作方式不同:它隐藏原始选择并创建自己的元素,当用户选择或取消选择元素时,它会将其状态与原始选择同步。
它称为 dropdown-check-list,这里是链接 dropdown-check-list
这样您就可以使用原始选择来进行例如 Spring 绑定。
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
was effectively changed to something different like
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.