Search in sources :

Example 71 with TextField

use of com.vaadin.flow.component.textfield.TextField in project Test-Bench-Data by DanielMartensson.

the class LxCurveView method createFilterField.

private TextField createFilterField(String placeHolder, GridCrud<LxData> crud) {
    TextField textField = new TextField();
    textField.setPlaceholder(placeHolder);
    textField.setClearButtonVisible(true);
    textField.addValueChangeListener(e -> crud.refreshGrid());
    return textField;
}
Also used : TextField(com.vaadin.flow.component.textfield.TextField)

Example 72 with TextField

use of com.vaadin.flow.component.textfield.TextField in project Test-Bench-Data by DanielMartensson.

the class LxDataView method createFilterField.

private TextField createFilterField(String placeHolder, GridCrud<LxData> crud) {
    TextField textField = new TextField();
    textField.setPlaceholder(placeHolder);
    textField.setClearButtonVisible(true);
    textField.addValueChangeListener(e -> crud.refreshGrid());
    return textField;
}
Also used : TextField(com.vaadin.flow.component.textfield.TextField)

Example 73 with TextField

use of com.vaadin.flow.component.textfield.TextField in project Test-Bench-Data by DanielMartensson.

the class RsqDataView method createFilterField.

private TextField createFilterField(String placeHolder, GridCrud<RsqData> crud) {
    TextField textField = new TextField();
    textField.setPlaceholder(placeHolder);
    textField.setClearButtonVisible(true);
    textField.addValueChangeListener(e -> crud.refreshGrid());
    return textField;
}
Also used : TextField(com.vaadin.flow.component.textfield.TextField)

Example 74 with TextField

use of com.vaadin.flow.component.textfield.TextField in project linkki by linkki-framework.

the class BindPlaceholderIntegrationTest method testAspectBindPlaceholderAnnotation_AutoWithValue.

@Test
void testAspectBindPlaceholderAnnotation_AutoWithValue() {
    TextField textfield = (TextField) uiElements.get("placeholderFieldAutoWithValue");
    String placeholderResult = textfield.getPlaceholder();
    assertThat(placeholderResult).isEqualTo("I am a placeholder");
}
Also used : UITextField(org.linkki.core.ui.element.annotation.UITextField) TextField(com.vaadin.flow.component.textfield.TextField) Test(org.junit.jupiter.api.Test)

Example 75 with TextField

use of com.vaadin.flow.component.textfield.TextField in project linkki by linkki-framework.

the class BindPlaceholderIntegrationTest method testAspectBindPlaceholderAnnotation_DynamicWithValue.

@Test
void testAspectBindPlaceholderAnnotation_DynamicWithValue() {
    TextField textfield = (TextField) uiElements.get("placeholderFieldDynamic");
    pmo.setPlaceholder("I got changed");
    bindingContext.modelChanged();
    String placeholderResult = textfield.getPlaceholder();
    assertThat(placeholderResult).isEqualTo("I got changed");
}
Also used : UITextField(org.linkki.core.ui.element.annotation.UITextField) TextField(com.vaadin.flow.component.textfield.TextField) Test(org.junit.jupiter.api.Test)

Aggregations

TextField (com.vaadin.flow.component.textfield.TextField)227 Test (org.junit.jupiter.api.Test)61 Button (com.vaadin.flow.component.button.Button)54 Div (com.vaadin.flow.component.html.Div)38 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)32 FormLayout (com.vaadin.flow.component.formlayout.FormLayout)29 Binder (com.vaadin.flow.data.binder.Binder)29 GeneratedVaadinTextField (com.vaadin.flow.component.textfield.GeneratedVaadinTextField)28 Element (com.vaadin.flow.dom.Element)26 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)23 Route (com.vaadin.flow.router.Route)21 Component (com.vaadin.flow.component.Component)16 Checkbox (com.vaadin.flow.component.checkbox.Checkbox)15 BinderCrudEditor (com.vaadin.flow.component.crud.BinderCrudEditor)15 Grid (com.vaadin.flow.component.grid.Grid)15 Span (com.vaadin.flow.component.html.Span)15 List (java.util.List)15 EmailField (com.vaadin.flow.component.textfield.EmailField)14 TextArea (com.vaadin.flow.component.textfield.TextArea)14 Test (org.junit.Test)14