/**
* 删除用户信息
*
* @return
* @throws Exception
*/
public String delete() throws Exception {
List<String> userIds = new ArrayList<String>();
for (String id : choose) {
userIds.add(new Integer(id));
}
UserObject userInfo = new UserObject();
userInfo.setUserIds(userIds);
tUser.setModifyUser(super.getCurrentUser().getUserId());
userInfo.setUser(tUser);
try {
ServiceProvider.getService(UserService.class).deleteUser(userInfo);
} catch (BizServiceException e) {
addActionError(e.getErrorMessage());
}
addActionMessage("删除用户成功!");
return SUCCESS;
}
前台页面message.jsp:
<s:if test="hasActionErrors()">
<div class="error">
<s:actionerror />
</div>
</s:if>
<s:if test="hasActionMessages()">
<div class="message" id="message">
<s:actionmessage />
</div>
<script type="text/javascript">
highlight("message");
window.setTimeout(function(){document.getElementById("message").style.display="none";}, 2000);
</script>
</s:if>
参考资料:
http://blog.csdn.net/titilover/article/details/6792854
http://zgphacker2010.iteye.com/blog/1020527