I am using touchkit 3 alpha 4 and vaadin 7. In our application I set and validate a state in a ClickListener, added to a NavigationButton, and want to render that state on the next view. But the method call in NavigationButton navigates first to the next view and sends afterwards the clickevent.
public void click() {
if (isEnabled() && !isReadOnly()) {
Connector targetView = getState().getTargetView();
if (targetView != null) {
getNavigationManager().navigateTo((Component) targetView);
}
fireClick();
}
}
So I got 2 questions:
- How do I prevent a navigation to the next view in case of a validation error?
- How can I set the state before rendering the next view?
Thx in advance.
Kind regards
Christian