Directory

← Back

Fluent API for Vaadin

This library is a Vaadin 8 server side complement to code components fluently (like builder pattern).

Author

Rating

Popularity

<100

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");

Compatibility

(Loading compatibility data...)

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). Fluent API for Vaadin - Vaadin Add-on Directory
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.
Online