@Override protected void onButtonPressed(TextButton button) { if (button.getText().equals(PredefinedButton.OK.toString())) { // Validate current card boolean isValid = FormPanelHelper.isValid((HasWidgets) cardLC.getActiveWidget()); if (isValid) { super.onButtonPressed(button); } } else { super.onButtonPressed(button); } }