@Override public void buttonClick(ClickEvent event) { try { passwordField.validate(); passwordConfirmField.validate(); if(!passwordField.getValue() .equals(passwordConfirmField.getValue())) { Notification.show("Password and confirmation must be the same!", Type.ERROR_MESSAGE); return; } } catch (InvalidValueException e) { passwordField.setValidationVisible(true); passwordConfirmField.setValidationVisible(true); return; } password = passwordField.getValue(); passwordField.setValue(""); passwordConfirmField.setValue(""); close(); } });
passwordField.validate();
passwordField.validate();
@Override public void buttonClick(ClickEvent event) { try { userNameField.validate(); passwordField.validate(); } catch (InvalidValueException e) { userNameField.setValidationVisible(true); passwordField.setValidationVisible(true); return; } try { binder.commit(); ikasanAuthentication = (IkasanAuthentication)authenticationService.authenticateLocal (userNameField.getValue(), passwordField.getValue()); userNameField.setValue(""); passwordField.setValue(""); close(); } catch (Exception e) { Notification.show(e.getMessage(), Notification.Type.ERROR_MESSAGE); } } });
@Override public void buttonClick(ClickEvent event) { try { userNameField.validate(); passwordField.validate(); } catch (InvalidValueException e) { userNameField.setValidationVisible(true); passwordField.setValidationVisible(true); return; } try { binder.commit(); userNameField.setValue(""); passwordField.setValue(""); close(); commitHandler.postCommit(); } catch (CommitException e) { Notification.show(e.getMessage(), Notification.Type.ERROR_MESSAGE); } } });
@Override public void buttonClick(ClickEvent event) { try { userNameField.validate(); passwordField.validate(); } catch (InvalidValueException e) { userNameField.setValidationVisible(true); passwordField.setValidationVisible(true); return; } try { binder.commit(); userNameField.setValue(""); passwordField.setValue(""); commitHandler.postCommit(); } catch (CommitException e) { passwordField.setValue(""); Notification.show(e.getMessage(), Notification.Type.ERROR_MESSAGE); } } });