KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > cms > login > struts > LoginForm


1 package com.dotmarketing.cms.login.struts;
2
3
4 import javax.servlet.http.HttpServletRequest JavaDoc;
5
6 import org.apache.struts.action.ActionErrors;
7 import org.apache.struts.action.ActionMapping;
8 import org.apache.struts.validator.ValidatorForm;
9
10 import com.liferay.portal.util.Constants;
11
12 public class LoginForm extends ValidatorForm {
13
14
15     /**
16      *
17      */

18     private static final long serialVersionUID = 1L;
19     String JavaDoc userName;
20     String JavaDoc password;
21     String JavaDoc dispatch;
22     boolean rememberMe;
23
24
25     /** default constructor */
26     public LoginForm() {
27     }
28
29     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
30         if(request.getParameter("cmd")!=null && request.getParameter("cmd").equals(Constants.ADD)) {
31
32             //return super.validate(mapping, request);
33
}
34         return null;
35     }
36
37     public ActionErrors subValidate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
38         return super.validate(mapping, request);
39     }
40
41     /**
42      * @return Returns the rememberMe.
43      */

44     public boolean isRememberMe() {
45         return this.rememberMe;
46     }
47     /**
48      * @param rememberMe The rememberMe to set.
49      */

50     public void setRememberMe(boolean rememberMe) {
51         this.rememberMe = rememberMe;
52     }
53     /**
54      * @return Returns the dispatch.
55      */

56     public String JavaDoc getDispatch() {
57         return this.dispatch;
58     }
59     /**
60      * @param dispatch The dispatch to set.
61      */

62     public void setDispatch(String JavaDoc dispatch) {
63         this.dispatch = dispatch;
64     }
65     /**
66      * @return Returns the password.
67      */

68     public String JavaDoc getPassword() {
69         return this.password;
70     }
71     /**
72      * @param password The password to set.
73      */

74     public void setPassword(String JavaDoc password) {
75         this.password = password;
76     }
77     /**
78      * @return Returns the userName.
79      */

80     public String JavaDoc getUserName() {
81         return this.userName;
82     }
83     /**
84      * @param userName The userName to set.
85      */

86     public void setUserName(String JavaDoc userName) {
87         this.userName = userName;
88     }
89 }
90
Popular Tags