3-State (tri-state) Checkbox?

Has anyone implemented a 3-state (tri-state) checkbox? i.e., the checkbox would have three states:

  • Checked
  • Unchecked
  • Indeterminate

It would look something like the image below when in the indeterminate state. In this case, the top-level checkbox is in the indeterminate state because the “children” checkbxoes are not all in the same state.

;ted
12028.png

I think the
CustomCheckbox add-on
would do the trick.

Would be great if the CustomCheckbox addon worked inside a Table / TreeTable. This would make a more “complete” solution.

It appears to only work stand-alone currently.

Hello, how should I configure the custom combo box in the case I want to use it within a Liferay portlet? How do I have to configure the widget set, etc?

Isn’t it possible to implements & use your own TableFactory which return CustomCheckBox ?

I’m agree that this feature, as many other, should be available with Table/TreeTable w/o using addon…

I am sorry to have to resurrect a long-dead thread, but I now find myself in need of being able to create a tri-state checkbox. Sadly, the
CustomCheckBox add-on
that @Teemu mentioned is
not
compatible with Vaadin 7+, nor is there another add-on that I could find which allows for a tri-state checkbox.

I have some code that a friend made for me a year or so ago when I was developing my Java program using Swing, so it has calls to a TreeTableModel, TreeTableRenderer, MouseAdapter, etc.—things that I don’t think should be necessary with Vaadin. (Not to mention that I have trouble understanding how it all works.) I don’t know if it would help for me to post that code here (it’s very lengthy and is in several files), or if there is already some other way to get a tri-state checkbox to work in Vaadin 7. Can anyone please help?