?? logonform.java
字號:
package com.elan.forum.formBean;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
public class LogonForm extends ActionForm{
private String username = null;
private String password = null;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
/*public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if(isEmptyStr(username)) {
errors.add("userlogonerr", new ActionError("username.not.null"));
if(isEmptyStr(password)) {
errors.add("userlogonerr", new ActionError("username.password.not.null"));
}
} else if(isEmptyStr(password)){
errors.add("userlogonerr", new ActionError("password.not.null"));
}
return errors;
}
private boolean isEmptyStr(String string) {
if(null == string) return true;
if ("".equals(string.trim()) || 0 == string.length()) {
return true;
}
return false;
}*/
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -