- I add the new from and use the navigation (com.vaadin.navigator.Navigator) to open it:
public class MyUI extends UI {
//
protected void init(VaadinRequest vaadinRequest) {
new Navigator(this, this);
getNavigator().addView(MyForm.NAME, MyForm.class);
getNavigator().navigateTo(MyForm.NAME);
//...
}
}
// class MyForm
public class MyForm extends CustomComponent implements View, Button.ClickListener {
public static final String NAME = "myform";
public AccountForm() {
setSizeFull();
TextField textField = new TextField("My Field");
ActionButtonTextField buttonTextField = ActionButtonTextField.extend(textField);
buttonTextField.getState().type = ActionButtonType.ACTION_SEARCH;
buttonTextField.addClickListener(new ActionButtonTextField.ClickListener() {
@Override
public void buttonClick(ActionButtonTextField.ClickEvent clickEvent) {
clickEvent.getTextField().setValue("The value after click");
}
});
VerticalLayout fields = new VerticalLayout(textField);
setCompositionRoot(fields);
}
//...
}
But, after run by jetty:run, I see only the text-field rendered on UI, do not see any action (button) on UI. And see on console of browser or debug of Vaadin I saw error:
Sat Apr 18 01:24:53 GMT+700 2015 com.vaadin.client.VConsole
SEVERE: Hierachy claims TextFieldConnector (51) has component children even though it isn't a HasComponentsConnector
But, after run by jetty:run, I see only the text-field rendered on UI, do not see any action (button) on UI. And see on console of browser or debug of Vaadin I saw error:
Please, help me.