@Override
protected void onFormSubmit() {
try {
UserUIModel user = (UserUIModel) NewUserPage.this.getDefaultModelObject();
GeoserverUserDao dao = GeoserverUserDao.get();
dao.putUser(user.toSpringUser());
dao.storeUsers();
setResponsePage(UserPage.class);
} catch(Exception e) {
LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
}