Search in sources :

Example 1 with TextField

use of de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField in project mvp4g2-examples by mvp4g.

the class DetailView method createView.

public void createView() {
    container = div().add(div().style("width: 100%;").add(div().css("headline").textContent("Details")).add(detailFirstName = new TextField("Firstname")).add(detailName = new TextField("Name")).add(detailStreet = new TextField("Street")).add(detailZip = new TextField("Zip")).add(detailCity = new TextField("City")).add(div().css("buttonBar").add(button().css("button").textContent("Save").on(click, event -> {
        updateDetailForm();
        getPresenter().doUpdate(person);
    })).add(button().css("button").textContent("Revert").on(click, event -> {
        getPresenter().doRevert();
    })))).asElement();
}
Also used : Element(elemental2.dom.Element) Elements.button(org.jboss.gwt.elemento.core.Elements.button) Elements.div(org.jboss.gwt.elemento.core.Elements.div) HTMLDivElement(elemental2.dom.HTMLDivElement) Person(de.gishmo.gwt.example.mvp4g2.simpleapplication.client.data.model.dto.Person) HTMLButtonElement(elemental2.dom.HTMLButtonElement) TextField(de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField) EventType.click(org.jboss.gwt.elemento.core.EventType.click) LazyReverseView(com.github.mvp4g.mvp4g2.core.ui.LazyReverseView) TextField(de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField)

Example 2 with TextField

use of de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField in project mvp4g2-examples by mvp4g.

the class DetailView method createView.

public void createView() {
    container = div().add(div().style("width: 100%;").add(div().css("headline").textContent("Details")).add(detailFirstName = new TextField("Firstname")).add(detailName = new TextField("Name")).add(detailStreet = new TextField("Street")).add(detailZip = new TextField("Zip")).add(detailCity = new TextField("City")).add(div().css("buttonBar").add(button().css("button").textContent("Save").on(click, event -> {
        updateDetailForm();
        getPresenter().doUpdate(person);
    })).add(button().css("button").textContent("Revert").on(click, event -> {
        getPresenter().doRevert();
    })))).asElement();
}
Also used : Element(elemental2.dom.Element) Elements.button(org.jboss.gwt.elemento.core.Elements.button) Elements.div(org.jboss.gwt.elemento.core.Elements.div) TextField(de.gishmo.gwt.example.mvp4g2.springboot.client.widgets.TextField) HTMLDivElement(elemental2.dom.HTMLDivElement) HTMLButtonElement(elemental2.dom.HTMLButtonElement) Person(de.gishmo.gwt.example.mvp4g2.springboot.client.data.model.dto.Person) EventType.click(org.jboss.gwt.elemento.core.EventType.click) LazyReverseView(com.github.mvp4g.mvp4g2.core.ui.LazyReverseView) TextField(de.gishmo.gwt.example.mvp4g2.springboot.client.widgets.TextField)

Example 3 with TextField

use of de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField in project mvp4g2-examples by mvp4g.

the class SearchView method createView.

public void createView() {
    container = div().add(div().style("width: 100%;").add(div().css("headline").textContent("Search Parameter (search for: 'S' or 'D')")).add(searchName = new TextField("Name")).add(searchCity = new TextField("City")).add(div().css("buttonBar").add(button().css("button").textContent("Search").on(click, event -> getPresenter().doClickSearchButton(searchName.getText(), searchCity.getText()))).add(button().css("button").textContent("Reset").on(click, event -> {
        searchName.setText("");
        searchCity.setText("");
    })).asElement())).asElement();
}
Also used : Element(elemental2.dom.Element) Elements.button(org.jboss.gwt.elemento.core.Elements.button) Elements.div(org.jboss.gwt.elemento.core.Elements.div) HTMLDivElement(elemental2.dom.HTMLDivElement) HTMLButtonElement(elemental2.dom.HTMLButtonElement) TextField(de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField) EventType.click(org.jboss.gwt.elemento.core.EventType.click) LazyReverseView(com.github.mvp4g.mvp4g2.core.ui.LazyReverseView) TextField(de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField)

Example 4 with TextField

use of de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField in project mvp4g2-examples by mvp4g.

the class SearchView method createView.

public void createView() {
    container = div().add(div().style("width: 100%;").add(div().css("headline").textContent("Search Parameter (search for: 'S' or 'D')")).add(searchName = new TextField("Name")).add(searchCity = new TextField("City")).add(div().css("buttonBar").add(button().css("button").textContent("Search").on(click, event -> getPresenter().doClickSearchButton(searchName.getText(), searchCity.getText()))).add(button().css("button").textContent("Reset").on(click, event -> {
        searchName.setText("");
        searchCity.setText("");
    })).asElement())).asElement();
}
Also used : Element(elemental2.dom.Element) Elements.button(org.jboss.gwt.elemento.core.Elements.button) Elements.div(org.jboss.gwt.elemento.core.Elements.div) TextField(de.gishmo.gwt.example.mvp4g2.springboot.client.widgets.TextField) HTMLDivElement(elemental2.dom.HTMLDivElement) HTMLButtonElement(elemental2.dom.HTMLButtonElement) EventType.click(org.jboss.gwt.elemento.core.EventType.click) LazyReverseView(com.github.mvp4g.mvp4g2.core.ui.LazyReverseView) TextField(de.gishmo.gwt.example.mvp4g2.springboot.client.widgets.TextField)

Aggregations

LazyReverseView (com.github.mvp4g.mvp4g2.core.ui.LazyReverseView)4 Element (elemental2.dom.Element)4 HTMLButtonElement (elemental2.dom.HTMLButtonElement)4 HTMLDivElement (elemental2.dom.HTMLDivElement)4 Elements.button (org.jboss.gwt.elemento.core.Elements.button)4 Elements.div (org.jboss.gwt.elemento.core.Elements.div)4 EventType.click (org.jboss.gwt.elemento.core.EventType.click)4 TextField (de.gishmo.gwt.example.mvp4g2.simpleapplication.client.widgets.TextField)2 TextField (de.gishmo.gwt.example.mvp4g2.springboot.client.widgets.TextField)2 Person (de.gishmo.gwt.example.mvp4g2.simpleapplication.client.data.model.dto.Person)1 Person (de.gishmo.gwt.example.mvp4g2.springboot.client.data.model.dto.Person)1