UIUserManagement userManagement = userInfo.getParent();
UIListUsers listUser = userManagement.getChild(UIListUsers.class);
UIAccountEditInputSet accountInput = userInfo.getChild(UIAccountEditInputSet.class);
UIUserProfileInputSet userProfile = userInfo.getChild(UIUserProfileInputSet.class);
userInfo.setRenderSibling(UIListUsers.class);
listUser.search(new Query());
accountInput.reset();
userProfile.reset();
context.setProcessRender(true);
}
return false;
}
invokeSetBindingField(user);
if (isChangePassword())
{
String pass1x = getUIStringInput(PASSWORD1X).getValue();
String pass2x = getUIStringInput(PASSWORD2X).getValue();
if (!pass1x.equals(pass2x))
{
uiApp.addMessage(new ApplicationMessage("UIAccountForm.msg.password-is-not-match", null, ApplicationMessage.WARNING));
return false;
}
user.setPassword(pass1x);
}
//Check if mail address is already used
Query query = new Query();
String email = getUIStringInput("email").getValue();
query.setEmail(email);
if (service.getUserHandler().findUsers(query).getAll().size() > 0 && !oldEmail.equals(email))
{
//Be sure it keep old value
user.setEmail(oldEmail);
query.setEmail(oldEmail);
Object[] args = {username};
uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.email-exist", args, ApplicationMessage.WARNING));
return false;
}
service.getUserHandler().saveUser(user, true);