Hi, looking for a certain tree feature

Hi, I’m very much a newb when it comes to Vaadin.

I’m looking for a feature that I have used in other GUI frameworks, but its at least not demoed in the sampler (or not available) and I need conformation that I’m missing something or that it does not exist.

What I need is for each row in the tree to have a checkbox, and the checkbox to be tri-state in nature so Yes, No and Maybe. The normal visable representation for which seems to be a tick, blank, and greyed in.

Beyond the combination of the tree and the tri-state checkbox there is often built in logic to handle the following

  1. checkbox changed from Maybe or No to Yes
    - All subordinate entries in the tree are set to Yes
    - All superior entries set to Maybe or Yes depending on the status of all subordinate entries of the superior.
  2. checkbox changed from Yes to No
    - All subordinate entries in the tree are set to No
    - All superior entries set to Maybe or No depending on the status of all subordinate entries of the superior.

This allows complex selections to be made, while the visable tree all so provides an indication of which parts of the tree may contain entires of Yes and Maybe. Having the logic built in makes it very simple to add a new entry with a certain state and that to then update the visable view of the tree.

Thanks

Sorry, nothing like that in Tree.

It could maybe be possible to do it with a TreeTable. It is exactly what the name says - a combination between a Tree and a Table. The Table-part supports properties, where you can put a checkbox into one column, and the Tree-part gives you hierarchy.

Thanks for the reply, but TreeTable does not help as it does not have any intergration with a check box.

An example of what I am looking for can be seen here

http://smartclient.com/#cascadingSelection

Not sure if I’m allowed to reference other solutions in these forums, but it’s fair to say that I’m looking to be able to do the same with nice Java based Vaadin, rather than send people elsewhere.

Roger

I believe there would be demand for such a component if somebody implements it as an add-on.

Much of the complexity of the current Tree component comes from the support for lazy loading, a selection tree that does not need lazy loading could be much simpler to implement. Integrating an existing GWT or JavaScript component as a Vaadin 7 add-on should also be fairly simple if you can find a suitable one. You could take a look e.g. at the jQuery
jsTree
with its checkbox plug-in if you have a little experience in JavaScript and build a Vaadin component around it (see related
tutorials
).