com.vaadin.flow.component.AbstractField Java Examples

The following examples show how to use com.vaadin.flow.component.AbstractField. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AuthView.java    From radman with MIT License 5 votes vote down vote up
private AbstractSinglePropertyField<? extends AbstractField<?, ?>, String> buildTextValueField() {
    binder.removeBinding("value");
    TextField valueField = new TextField("Value");
    valueField.setValueChangeMode(ValueChangeMode.EAGER);
    valueField.setClearButtonVisible(false);
    binder.bind(valueField, "value");
    return valueField;
}
 
Example #2
Source File: AuthView.java    From radman with MIT License 5 votes vote down vote up
private AbstractSinglePropertyField<? extends AbstractField<?, ?>, String> buildPasswordValueField() {
    binder.removeBinding("value");
    PasswordField valueField = new PasswordField("Value");
    valueField.setValueChangeMode(ValueChangeMode.EAGER);
    valueField.setClearButtonVisible(false);
    binder.bind(valueField, "value");
    return valueField;
}
 
Example #3
Source File: ClientSelectComponent.java    From flow with Apache License 2.0 5 votes vote down vote up
private void setValue(
        AbstractField.ComponentValueChangeEvent<Select, String> event) {
    String messageText = "No selection";
    Optional<Object> item = select.getItem();

    if (item.isPresent()) {
        messageText = "Selected: " + ((Client) item.get()).getFullName();
    }

    message.setText(messageText);
}
 
Example #4
Source File: SearchView.java    From vaadin-app-layout with Apache License 2.0 4 votes vote down vote up
public void addValueChangeListener(HasValue.ValueChangeListener<? super AbstractField.ComponentValueChangeEvent<TextField, String>> listener) {
    searchField.addValueChangeListener(listener);
}