?? accountactionform.java
字號:
package org.apache.struts.webapp.exercise;
import java.util.List;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.webapp.exercise.Account;
public class AccountActionForm extends ActionForm {
private static final List LANGUAGE_LIST = new ArrayList();
private static final List CATEGORY_LIST = new ArrayList();
private String username;
private String password;
private String repeatedPassword;
private String validate;
private String forwardAction;
private List languages = new ArrayList();
private List categories = new ArrayList();
private Account account = new Account();
static {
LANGUAGE_LIST.add("English");
LANGUAGE_LIST.add("Chinese");
CATEGORY_LIST.add("Phone");
CATEGORY_LIST.add("Camera");
}
public AccountActionForm(){
this.categories = CATEGORY_LIST ;
this.languages = LANGUAGE_LIST ;
}
/* (non-Javadoc)
* @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
account = new Account();
this.username = "";
this.password = "";
this.repeatedPassword = "";
this.categories = CATEGORY_LIST ;
this.languages = LANGUAGE_LIST ;
}
/**
* @return Returns the account.
*/
public Account getAccount() {
return account;
}
/**
* @param account The account to set.
*/
public void setAccount(Account account) {
this.account = account;
}
/**
* @return Returns the categories.
*/
public List getCategories() {
return categories;
}
/**
* @param categories The categories to set.
*/
public void setCategories(List categories) {
this.categories = categories;
}
/**
* @return Returns the forwardAction.
*/
public String getForwardAction() {
return forwardAction;
}
/**
* @param forwardAction The forwardAction to set.
*/
public void setForwardAction(String forwardAction) {
this.forwardAction = forwardAction;
}
/**
* @return Returns the languages.
*/
public List getLanguages() {
return languages;
}
/**
* @param languages The languages to set.
*/
public void setLanguages(List languages) {
this.languages = languages;
}
/**
* @return Returns the password.
*/
public String getPassword() {
return password;
}
/**
* @param password The password to set.
*/
public void setPassword(String password) {
this.password = password;
}
/**
* @return Returns the repeatedPassword.
*/
public String getRepeatedPassword() {
return repeatedPassword;
}
/**
* @param repeatedPassword The repeatedPassword to set.
*/
public void setRepeatedPassword(String repeatedPassword) {
this.repeatedPassword = repeatedPassword;
}
/**
* @return Returns the username.
*/
public String getUsername() {
return username;
}
/**
* @param username The username to set.
*/
public void setUsername(String username) {
this.username = username;
}
/**
* @return Returns the validate.
*/
public String getValidate() {
return validate;
}
/**
* @param validate The validate to set.
*/
public void setValidate(String validate) {
this.validate = validate;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -