📄 userinfoactionform.java
字号:
package com.laoer.bbscs.bbs.actionform;
import org.apache.struts.action.*;
import javax.servlet.http.*;
public class UserInfoActionForm
extends ActionForm {
private String showtype;
private String sid;
private String uid;
private String uname;
public String getShowtype() {
return showtype;
}
public void setShowtype(String showtype) {
this.showtype = showtype;
}
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getUid() {
return uid;
}
public void setUid(String uID) {
this.uid = uID;
}
public String getUname() {
return uname;
}
public void setUname(String uname) {
this.uname = uname;
}
public ActionErrors validate(ActionMapping actionMapping,
HttpServletRequest httpServletRequest) {
ActionErrors errors = new ActionErrors();
if (sid == null || sid.length() == 0 || showtype == null ||
showtype.length() == 0) {
errors.add("parametererror", new ActionError("error.parametererror"));
}
if (showtype.equals("userID")) {
if (uid == null || uid.length() == 0) {
errors.add("parametererror", new ActionError("error.parametererror"));
}
}
if (showtype.equals("userName")) {
if (uname == null || uname.length() == 0) {
errors.add("parametererror", new ActionError("error.parametererror"));
}
}
return (errors);
}
public void reset(ActionMapping actionMapping,
HttpServletRequest httpServletRequest) {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -