use of com.alibaba.otter.manager.biz.common.exceptions.RepeatConfigureException in project otter by alibaba.
the class UserAction method doEdit.
public void doEdit(@FormGroup("editUserInfo") Group userInfo, @Param("pageIndex") int pageIndex, @Param("searchKey") String searchKey, Navigator nav, @FormField(name = "formUserError", group = "editUserInfo") CustomErrors err) {
User user = new User();
userInfo.setProperties(user);
if (null != user.getPassword()) {
if (user.getPassword().length() < 6) {
err.setMessage("passwordTooLess");
return;
}
user.setPassword(SecurityUtils.getPassword(user.getPassword()));
}
try {
userService.updataUser(user);
} catch (RepeatConfigureException rce) {
err.setMessage("invalidUser");
return;
}
nav.redirectToLocation("userManager.htm?pageIndex=" + pageIndex + "&searchKey=" + urlEncode(searchKey));
}
Aggregations