Source Code Cross Referenced for UserForm.java in  » Workflow-Engines » bonita-v3.1 » hero » struts » forms » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » bonita v3.1 » hero.struts.forms 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package hero.struts.forms;
002:
003:        import javax.servlet.http.HttpServletRequest;
004:        import org.apache.struts.action.ActionError;
005:        import org.apache.struts.action.ActionErrors;
006:        import org.apache.struts.action.ActionForm;
007:        import org.apache.struts.action.ActionMapping;
008:
009:        /**
010:         * Form bean for the BnUser.  This form has the following fields,
011:         * with default values in square brackets:
012:         * <ul>
013:         * <li><b>name</b> - The name of the user.  [REQUIRED]
014:         * <li><b>password</b> - The password for this user.  [REQUIRED]
015:         * <li><b>email</b> - The email [REQUIRED]
016:         * </ul>
017:         *
018:         * @author Miguel Valdes Faura
019:         * @version $Revision: 1.1 $ $Date: 2004/07/30 14:57:57 $
020:         */
021:
022:        public final class UserForm extends ActionForm {
023:
024:            // =================================================== Instance Variables
025:
026:            /**
027:             * The user name
028:             */
029:            private String name = null;
030:
031:            /**
032:             * The password of the user
033:             */
034:
035:            private String password = null;
036:
037:            /**
038:             * The email of the user
039:             */
040:
041:            private String email = null;
042:
043:            /**
044:             * The jabber address of the user
045:             */
046:
047:            private String jabber = null;
048:
049:            // =========================================================== Properties
050:
051:            /**
052:             * Return the name
053:             */
054:            public String getName() {
055:
056:                return (this .name);
057:
058:            }
059:
060:            /**
061:             * Set the name
062:             *
063:             */
064:            public void setName(String name) {
065:
066:                this .name = name;
067:
068:            }
069:
070:            /**
071:             * Return the password
072:             */
073:            public String getPassword() {
074:
075:                return (this .password);
076:
077:            }
078:
079:            /**
080:             * Set the password
081:             *
082:             */
083:            public void setPassword(String password) {
084:
085:                this .password = password;
086:
087:            }
088:
089:            /**
090:             * Return the email
091:             */
092:            public String getEmail() {
093:
094:                return (this .email);
095:
096:            }
097:
098:            /**
099:             * Set the email
100:             *
101:             */
102:            public void setEmail(String email) {
103:
104:                this .email = email;
105:
106:            }
107:
108:            /**
109:             * Return the jabber address
110:             */
111:            public String getJabber() {
112:
113:                return (this .jabber);
114:
115:            }
116:
117:            /**
118:             * Set the jabber address
119:             *
120:             */
121:            public void setJabber(String jabber) {
122:
123:                this .jabber = jabber;
124:
125:            }
126:
127:            // --------------------------------------------------------- Public Methods
128:
129:            /**
130:             * Reset all properties to their default values.
131:             *
132:             * @param mapping The mapping used to select this instance
133:             * @param request The servlet request we are processing
134:             */
135:            public void reset(ActionMapping mapping, HttpServletRequest request) {
136:
137:                this .name = null;
138:                this .password = null;
139:                this .email = null;
140:                this .jabber = null;
141:            }
142:
143:            /**
144:             * Validate the properties that have been set from this HTTP request,
145:             * and return an <code>ActionErrors</code> object that encapsulates any
146:             * validation errors that have been found.  If no errors are found, return
147:             * <code>null</code> or an <code>ActionErrors</code> object with no
148:             * recorded error messages.
149:             *
150:             * @param mapping The mapping used to select this instance
151:             * @param request The servlet request we are processing
152:             */
153:            public ActionErrors validate(ActionMapping mapping,
154:                    HttpServletRequest request) {
155:
156:                ActionErrors errors = new ActionErrors();
157:
158:                if (name == null || name.length() == 0)
159:                    errors.add("name", new ActionError(
160:                            "error.username.required"));
161:                if (password == null || password.length() == 0)
162:                    errors.add("password", new ActionError(
163:                            "error.password.required"));
164:                if (email == null || email.length() == 0)
165:                    errors
166:                            .add("email", new ActionError(
167:                                    "error.email.required"));
168:                if (jabber == null || jabber.length() == 0)
169:                    errors.add("jabber", new ActionError(
170:                            "error.jabber.required"));
171:
172:                return (errors);
173:
174:            }
175:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.