?? loginform.java
字號:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.struts.form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;
import com.base.Constants;
/**
* MyEclipse Struts
* Creation date: 09-11-2007
*
* XDoclet definition:
* @struts.form name="loginForm"
*/
public class LoginForm extends ActionForm {
/*
* Generated fields
*/
/** loginPwd property */
private String loginPwd;
/** loginName property */
private String loginName;
/*
* Generated Methods
*/
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
String p = request.getParameter("method");
if (p!=null && p.equals("logout"))return null;
ActionErrors errors = new ActionErrors();
ActionMessages msg = new ActionMessages();
if(loginName==null||loginName.length()<1){
msg.add("loginName", new ActionMessage(Constants.ADMIN_LOSTNAME_KEY));
}else if(loginPwd==null||loginPwd.length()<1){
msg.add("loginPwd", new ActionMessage(Constants.ADMIN_LOSTPWD_KEY));
}
errors.add(msg);
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
this.loginName = null;
this.loginPwd = null;
}
/**
* Returns the loginPwd.
* @return String
*/
public String getLoginPwd() {
return loginPwd;
}
/**
* Set the loginPwd.
* @param loginPwd The loginPwd to set
*/
public void setLoginPwd(String loginPwd) {
this.loginPwd = loginPwd;
}
/**
* Returns the loginName.
* @return String
*/
public String getLoginName() {
return loginName;
}
/**
* Set the loginName.
* @param loginName The loginName to set
*/
public void setLoginName(String loginName) {
this.loginName = loginName;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -