This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
vaadin_splitbutton [2015/03/12 13:29] mihael created |
vaadin_splitbutton [2015/04/15 07:24] mihael |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Vaadin Splitbutton ====== | ====== Vaadin Splitbutton ====== | ||
+ | |||
+ | |||
+ | <note important>This self-made splitbutton composition is not necessary any more. The Vaadin Valo theme supports splitbuttons via the MenuBar component, see [[http://demo.vaadin.com/valo-theme/#!menubars|Vaadin Valo Demo Menu Bars]].</note> | ||
+ | |||
Bootstrap has such a nice splitbutton UI component. But with some composition you can have a similar component in Vaadin (with the Valo theme) by using the CssLayout and the ''v-component-group'' CSS class. | Bootstrap has such a nice splitbutton UI component. But with some composition you can have a similar component in Vaadin (with the Valo theme) by using the CssLayout and the ''v-component-group'' CSS class. | ||
Line 20: | Line 24: | ||
group.addComponent(box); | group.addComponent(box); | ||
</sxh> | </sxh> | ||
+ | |||
+ | <note tip>Don't miss to reset the value of the combo box after handling the event: | ||
+ | |||
+ | box.setValue(null); | ||
+ | |||
+ | </note> | ||
{{tag>vaadin java}} | {{tag>vaadin java}} |