/TourismSystem/src/cn/edu/buaa/scse/liyi/form/GuestForm.java
http://tourismsystem.googlecode.com/ · Java · 166 lines · 144 code · 19 blank · 3 comment · 2 complexity · ebbaf7e0290a081dc08efe54a3170a94 MD5 · raw file
- package cn.edu.buaa.scse.liyi.form;
-
- import java.util.ArrayList;
- import java.util.List;
-
- import javax.servlet.http.HttpServletRequest;
-
- import org.apache.struts.Globals;
- import org.apache.struts.action.ActionErrors;
- import org.apache.struts.action.ActionForm;
- import org.apache.struts.action.ActionMapping;
- import org.apache.struts.action.ActionMessage;
-
- import cn.edu.buaa.scse.liyi.model.Guest;
-
- public class GuestForm extends ActionForm
- {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private String userid;
- private String username;
- private String useroldpwd;
- private String usernewpwd;
- private String usernewpwd_submit;
- private String applyrole;
- private String userphone;
- private String useremail;
- private String applyreason;
- private Guest guest;
- private List<Guest> guestlist;
-
- public GuestForm()
- {
- super();
- }
-
- public void reset(ActionMapping mapping,HttpServletRequest request)
- {
- userid="";
- username="";
- useroldpwd="";
- usernewpwd="";
- usernewpwd_submit="";
- applyrole="";
- userphone="";
- useremail="";
- applyreason="";
- guest=new Guest();
- guestlist=new ArrayList<Guest>();
- }
-
- public ActionErrors validate(ActionMapping mapping,HttpServletRequest request)
- {
- ActionErrors errors=new ActionErrors();
- String mappingName=mapping.getPath();
- if(mappingName.equalsIgnoreCase("/userList"))
- {
- if(!usernewpwd.equals(usernewpwd_submit))
- {
- errors.add(Globals.ERROR_KEY,new ActionMessage(""));
- }
- }
- return errors;
- }
-
- public void setUserid(String userid)
- {
- this.userid=userid;
- }
- public String getUserid()
- {
- return userid;
- }
-
- public void setUsername(String username)
- {
- this.username=username;
- }
- public String getUsername()
- {
- return username;
- }
-
- public void setUseroldpwd(String useroldpwd)
- {
- this.useroldpwd=useroldpwd;
- }
- public String getUseroldpwd()
- {
- return useroldpwd;
- }
-
- public void setUsernewpwd(String usernewpwd)
- {
- this.usernewpwd=usernewpwd;
- }
- public String getUsernewpwd()
- {
- return usernewpwd;
- }
-
- public void setUsernewpwd_submit(String usernewpwd_submit)
- {
- this.usernewpwd_submit=usernewpwd_submit;
- }
- public String getUsernewpwd_submit()
- {
- return usernewpwd_submit;
- }
-
- public void setApplyrole(String applyrole)
- {
- this.applyrole=applyrole;
- }
- public String getApplyrole()
- {
- return applyrole;
- }
-
- public void setUserphone(String userphone)
- {
- this.userphone=userphone;
- }
- public String getUserphone()
- {
- return userphone;
- }
-
- public void setUseremail(String useremail)
- {
- this.useremail=useremail;
- }
- public String getUseremail()
- {
- return useremail;
- }
-
- public void setApplyreason(String applyreason)
- {
- this.applyreason=applyreason;
- }
- public String getApplyreason()
- {
- return applyreason;
- }
-
- public void setGuest(Guest guest)
- {
- this.guest=guest;
- }
- public Guest getGuest()
- {
- return guest;
- }
-
- public void setGuestlist(List<Guest> guestlist)
- {
- this.guestlist=guestlist;
- }
- public List<Guest> getGuestlist()
- {
- return guestlist;
- }
- }