Search in sources :

Example 1 with HasComponents

use of com.vaadin.flow.component.HasComponents in project flow by vaadin.

the class SubPropertyModelTemplate method valueUpdated.

@EventHandler
private void valueUpdated() {
    Div div = new Div();
    div.setId("value-update");
    div.setText(getStatus().getMessage());
    ((HasComponents) getParent().get()).add(div);
}
Also used : Div(com.vaadin.flow.component.html.Div) HasComponents(com.vaadin.flow.component.HasComponents) EventHandler(com.vaadin.flow.component.polymertemplate.EventHandler)

Example 2 with HasComponents

use of com.vaadin.flow.component.HasComponents in project flow by vaadin.

the class SubPropertyModelTemplate method sync.

@EventHandler
private void sync() {
    Div div = new Div();
    div.setId("synced-msg");
    div.setText(getStatus().getMessage());
    ((HasComponents) getParent().get()).add(div);
}
Also used : Div(com.vaadin.flow.component.html.Div) HasComponents(com.vaadin.flow.component.HasComponents) EventHandler(com.vaadin.flow.component.polymertemplate.EventHandler)

Example 3 with HasComponents

use of com.vaadin.flow.component.HasComponents in project flow by vaadin.

the class SubPropertyModelTemplate method click.

@EventHandler
private void click(@ModelItem("status") Status statusItem) {
    Div div = new Div();
    div.setId("statusClick");
    div.setText(statusItem.getMessage());
    ((HasComponents) getParent().get()).add(div);
}
Also used : Div(com.vaadin.flow.component.html.Div) HasComponents(com.vaadin.flow.component.HasComponents) EventHandler(com.vaadin.flow.component.polymertemplate.EventHandler)

Aggregations

HasComponents (com.vaadin.flow.component.HasComponents)3 Div (com.vaadin.flow.component.html.Div)3 EventHandler (com.vaadin.flow.component.polymertemplate.EventHandler)3