问题
I want to achieve the following:
It should be possible to create entries, and these entries (Strings) should be displayed as a list. A list entry should be selectable (with listener method on each entry) by a single click, without holding any keyboard buttons. Also clicking an already selected entry should deselect it.
Also, an entry should get a dimension, which will specify the number of subentries. These should be visible by some kind of expand button before the entry. Again, subentries should also be multiple selectable.
Are there components that already provide such a feature? If not, what should I look into to build such a component?
回答1:
I don't know of any component that does that.
Having said that, OmniFaces has a tree component that allows for custom markup for the hierarchical elements, it may be worthy look into.
回答2:
I found the GWT Tree Cell component by now: http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellTree
来源:https://stackoverflow.com/questions/13780466/multiple-select-list-with-actionlisteners