📄 dongform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.egt.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: 11-01-2007
*
* XDoclet definition:
* @struts.form name="dongForm"
*/
public class DongForm extends ActionForm {
/*
* Generated fields
*/
/** password property */
private String password;
/** userID property */
private String userID;
/** username property */
private String username;
/*
* Generated Methods
*/
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
{
// TODO Auto-generated method stub
ActionErrors errors=new ActionErrors();
ActionError noUserIDError=new ActionError("No userID");
ActionError noNameError=new ActionError("No Name");
ActionError noPasswordError=new ActionError("No Password");
if(userID==null||userID.length()<1)
{
errors.add("userID",noUserIDError);
}
if(username==null||username.length()<1)
{
errors.add("username",noNameError);
}
if(password==null||password.length()<1)
{
errors.add("password",noPasswordError);
}
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
/**
* Returns the password.
* @return String
*/
public String getPassword() {
return password;
}
/**
* Set the password.
* @param password The password to set
*/
public void setPassword(String password) {
this.password = password;
}
/**
* Returns the userID.
* @return String
*/
public String getUserID() {
return userID;
}
/**
* Set the userID.
* @param userID The userID to set
*/
public void setUserID(String userID) {
this.userID = userID;
}
/**
* Returns the username.
* @return String
*/
public String getUsername() {
return username;
}
/**
* Set the username.
* @param username The username to set
*/
public void setUsername(String username) {
this.username = username;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -