Fluent API for Vaadin
This library is a Vaadin 8 server side complement to code components fluently (like builder pattern).
Each ui component class is available with its fluent counter part working out-of-the-box.
Each setter has also its fluent version prefixed with the word "with" instead of "set".
Each fluent class implements a fluent interface which adds the fluent methods. Therefore, it's easy to add fluent functionality to an existing component : just implement the right interface.
Lets say you have a custom ComboBox doing fancy stuff in your project and you want to add fluent way to code it. Implement the FluentComboBox interface.
Sample code
FTextField field = new FTextField().withPlaceholder("enter text") .withValue("some text") .withCaption("My textbox") .withValueChangeMode(ValueChangeMode.TIMEOUT) .withValueChangeTimeout(5000);
public class MyComboBox<T> extends ComboBox<T> implements FluentComboBox<MyComboBox, T> { //... } //then MyComboBox<String> myCb = new MyComboBox<String>().withCaption("My combo box").withItems("aaa", "bbb", "ccc");
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Implementation of remaining fluent components
- Released
- 2017-09-08
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 8.1+
- Browser
- N/A
Fluent API for Vaadin - Vaadin Add-on Directory
This library is a Vaadin 8 server side complement to code components fluently (like builder pattern).Source Code
Discussion Forum
Javadoc
Fluent API for Vaadin version 1.0
Available fluent components
FTextField
FTextArea
FComboBox
FFormLayout
FVerticalLayout
FHorizontalLayout
FCssLayout
FGridLayout
FPanel
FCheckBoxGroup
FListSelect
FTwinColSelect
FAction
Fluent API for Vaadin version 1.1
- FButton
- FNativeButton
- FNativeSelect
- FRadionButtonGroup
- FLabel
- FLink
- FCheckBox
- FTabSheet
- fix missing methods for FluentComboBox
- update javadoc
Fluent API for Vaadin version 1.2
New fluent components available :
-FMenuBar
-FProgressBar
-FPopupView
-FHorizontalSplitPanel
-FVerticalSplitPanel
-FSlider
-FRichTextArea
-FDateField
-FInlineDateField
-FDateTimeField
Javadoc available
Fluent API for Vaadin version 1.3
Implementation of remaining fluent components