forked from tapioaali/ResetButtonForTextField
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
- 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
- I found the some issues related to this error on Vaadin issues: http://dev.vaadin.com/ticket/10799, http://dev.vaadin.com/ticket/10379 , but it is open or not fix.
- How to resolve it ? I tried many time but it not run OK, and always shown this error.
Please, help me.
Metadata
Metadata
Assignees
Labels
No labels