void handleSubmitError(Exception e) { LOGGER.log(Level.SEVERE, "Error occurred while saving user", e); if (e instanceof RuntimeException && e.getCause() instanceof Exception) { e = (Exception) e.getCause(); } if (e instanceof IOException && e.getCause() instanceof AbstractSecurityException) { e = (Exception) e.getCause(); } if (e instanceof AbstractSecurityException) { error(e); } else { error(new ParamResourceModel("saveError", getPage(), e.getMessage()).getObject()); } }
void handleSubmitError(Exception e) { LOGGER.log(Level.SEVERE, "Error occurred while saving user", e); if (e instanceof RuntimeException && e.getCause() instanceof Exception) { e = (Exception) e.getCause(); } if (e instanceof IOException && e.getCause() instanceof AbstractSecurityException) { e = (Exception) e.getCause(); } if (e instanceof AbstractSecurityException) { error(e); } else { error(new ParamResourceModel("saveError", getPage(), e.getMessage()).getObject()); } }
void handleSubmitError(Exception e) { LOGGER.log(Level.SEVERE, "Error occurred while saving user", e); if (e instanceof RuntimeException && e.getCause() instanceof Exception) { e = (Exception) e.getCause(); } if (e instanceof IOException && e.getCause() instanceof AbstractSecurityException) { e = (Exception) e.getCause(); } if (e instanceof AbstractSecurityException) { error(e); } else { error(new ParamResourceModel("saveError", getPage(), e.getMessage()).getObject()); } }
@Override public void validate(Form<?> form) { if (adminGroupChoice.isEnabled()) { adminGroupChoice.updateModel(); if (adminGroupChoice.getModelObject().isEmpty()) { form.error(new StringResourceModel("noAdminGroups", getPage(), null).getString()); } } } }
@Override public void validate(Form<?> form) { if (adminGroupChoice.isEnabled()) { adminGroupChoice.updateModel(); if (adminGroupChoice.getModelObject().isEmpty()) { form.error(new StringResourceModel("noAdminGroups", getPage(), null).getString()); } } } }
@Override public void validate(Form<?> form) { if (adminGroupChoice.isEnabled()) { adminGroupChoice.updateModel(); if (adminGroupChoice.getModelObject().isEmpty()) { form.error( new StringResourceModel("noAdminGroups", getPage(), null).getString()); } } } }