@Override public void onPreviewNativeEvent(NativePreviewEvent e) { NativeEvent nativeEvent = e.getNativeEvent(); if ("keydown".equals(nativeEvent.getType())) { if (nativeEvent.getKeyCode() == KeyCodes.KEY_ENTER) { doLogin(userBox.getText().trim(), passBox.getText(), rememberBox.getValue()); } } }
@UiHandler("loginButton") public void submitAction(ClickEvent e) { doLogin(userBox.getText().trim(), passBox.getText(), rememberBox.getValue()); }