📄 passwordform.java
字号:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.8.4/xslt/JavaClass.xslpackage com.infosys.struts.form;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;/** * MyEclipse Struts * Creation date: 08-23-2005 * * XDoclet definition: * @struts:form name="passwordForm" */public class PasswordForm extends ActionForm { // --------------------------------------------------------- Instance Variables /** new_pwd property */ private String new_pwd; /** new_pwd2 property */ private String new_pwd2; /** old_pwd property */ private String old_pwd; /** action property */ private String action; // --------------------------------------------------------- Methods /** * Method validate * @param mapping * @param request * @return ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { if(action!=null && action.equalsIgnoreCase("save")){ ActionErrors errors=new ActionErrors(); if((old_pwd==null)||(old_pwd.length()<1)){ errors.add("old_pwd",new ActionError("tips.this.isNull")); } if((new_pwd==null)||(new_pwd.length()<1)){ errors.add("new_pwd",new ActionError("tips.this.isNull")); } if((new_pwd2==null)||(new_pwd2.length()<1)){ errors.add("new_pwd2",new ActionError("tips.this.isNull")); } return errors; }else{ return null; } } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { this.new_pwd=null; this.new_pwd2=null; this.old_pwd=null; } /** * Returns the new_pwd. * @return String */ public String getNew_pwd() { return new_pwd; } /** * Set the new_pwd. * @param new_pwd The new_pwd to set */ public void setNew_pwd(String new_pwd) { this.new_pwd = new_pwd; } /** * Returns the new_pwd2. * @return String */ public String getNew_pwd2() { return new_pwd2; } /** * Set the new_pwd2. * @param new_pwd2 The new_pwd2 to set */ public void setNew_pwd2(String new_pwd2) { this.new_pwd2 = new_pwd2; } /** * Returns the old_pwd. * @return String */ public String getOld_pwd() { return old_pwd; } /** * Set the old_pwd. * @param old_pwd The old_pwd to set */ public void setOld_pwd(String old_pwd) { this.old_pwd = old_pwd; } /** * @return 返回 action。 */ public String getAction() { return action; } /** * @param action 要设置的 action。 */ public void setAction(String action) { this.action = action; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -