📄 userinfoform.java
字号:
package com.laoer.bbscs.web.form;
import org.apache.struts.action.*;
import javax.servlet.http.*;
/**
* <p>Title: TianYi BBS</p>
* <p>Description: TianYi BBS System</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: LAOER.COM/TIANYISOFT.NET</p>
* @author laoer
* @version 6.0
*/
public class UserInfoForm
extends ActionForm {
private long id;
private String t;
private String username;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getT() {
return t;
}
public void setT(String t) {
this.t = t;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public ActionErrors validate(ActionMapping actionMapping,
HttpServletRequest httpServletRequest) {
ActionErrors errors = new ActionErrors();
if (t == null) {
t = "id";
}
if (t.equals("id")) {
if (id == 0) {
errors.add("parametererror", new ActionError("error.parametererror"));
}
}
if (t.equals("name")) {
if (username == null || username.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 + -