Source Code Cross Referenced for TypeForm.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » webapp » validator » 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 » Web Framework » struts 1.3.8 » org.apache.struts.webapp.validator 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: TypeForm.java 471754 2006-11-06 14:55:09Z husted $
003:         *
004:         * Licensed to the Apache Software Foundation (ASF) under one
005:         * or more contributor license agreements.  See the NOTICE file
006:         * distributed with this work for additional information
007:         * regarding copyright ownership.  The ASF licenses this file
008:         * to you under the Apache License, Version 2.0 (the
009:         * "License"); you may not use this file except in compliance
010:         * with the License.  You may obtain a copy of the License at
011:         *
012:         *  http://www.apache.org/licenses/LICENSE-2.0
013:         *
014:         * Unless required by applicable law or agreed to in writing,
015:         * software distributed under the License is distributed on an
016:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017:         * KIND, either express or implied.  See the License for the
018:         * specific language governing permissions and limitations
019:         * under the License.
020:         */
021:
022:        package org.apache.struts.webapp.validator;
023:
024:        import java.io.Serializable;
025:        import java.util.ArrayList;
026:        import java.util.List;
027:        import javax.servlet.http.HttpServletRequest;
028:        import org.apache.struts.action.ActionMapping;
029:        import org.apache.struts.util.LabelValueBean;
030:        import org.apache.struts.validator.ValidatorForm;
031:
032:        /**
033:         * Form bean for the user type page.
034:         *
035:         */
036:        public final class TypeForm extends ValidatorForm implements 
037:                Serializable {
038:            private String action = null;
039:            private String name = null; //Used to test Multiform per page validation when property name is 'name'
040:            private String sByte = null;
041:            private String sShort = null;
042:            private String sInteger = null;
043:            private String sIntRange = null;
044:            private String sLong = null;
045:            private String sFloat = null;
046:            private String sFloatRange = null;
047:            private String sDouble = null;
048:            private String sDate = null;
049:            private String sCreditCard = null;
050:            private String sEmail = null;
051:            private String sUrl = null;
052:            private String sMask = null;
053:            private String sMinMaxLength = null;
054:            private String sSatisfaction = null;
055:            private String[] sOsList = null;
056:            private String sOverallSatisfaction = null;
057:            private String sWouldRecommend = null;
058:            private String[] sUsedLanguages = null;
059:
060:            private List lNames = initNames();
061:
062:            public String getAction() {
063:                return action;
064:            }
065:
066:            public void setAction(String action) {
067:                this .action = action;
068:            }
069:
070:            public String getName() {
071:                return name;
072:            }
073:
074:            public void setName(String name) {
075:                this .name = name;
076:            }
077:
078:            public String getByte() {
079:                return sByte;
080:            }
081:
082:            public void setByte(String sByte) {
083:                this .sByte = sByte;
084:            }
085:
086:            public String getShort() {
087:                return sShort;
088:            }
089:
090:            public void setShort(String sShort) {
091:                this .sShort = sShort;
092:            }
093:
094:            public String getInteger() {
095:                return sInteger;
096:            }
097:
098:            public void setInteger(String sInteger) {
099:                this .sInteger = sInteger;
100:            }
101:
102:            public String getIntRange() {
103:                return sIntRange;
104:            }
105:
106:            public void setIntRange(String sIntRange) {
107:                this .sIntRange = sIntRange;
108:            }
109:
110:            public String getLong() {
111:                return sLong;
112:            }
113:
114:            public void setLong(String sLong) {
115:                this .sLong = sLong;
116:            }
117:
118:            public String getFloat() {
119:                return sFloat;
120:            }
121:
122:            public void setFloat(String sFloat) {
123:                this .sFloat = sFloat;
124:            }
125:
126:            /**
127:             * Float field with range checking
128:             * @return
129:             */
130:            public String getFloatRange() {
131:                return sFloatRange;
132:            }
133:
134:            /**
135:             * Float field with range checking
136:             * @param sFloatRange
137:             */
138:            public void setFloatRange(String sFloatRange) {
139:                this .sFloatRange = sFloatRange;
140:            }
141:
142:            public String getDouble() {
143:                return sDouble;
144:            }
145:
146:            public void setDouble(String sDouble) {
147:                this .sDouble = sDouble;
148:            }
149:
150:            public String getDate() {
151:                return sDate;
152:            }
153:
154:            public void setDate(String sDate) {
155:                this .sDate = sDate;
156:            }
157:
158:            public String getCreditCard() {
159:                return sCreditCard;
160:            }
161:
162:            public void setCreditCard(String sCreditCard) {
163:                this .sCreditCard = sCreditCard;
164:            }
165:
166:            public String getMinMaxLength() {
167:                return sMinMaxLength;
168:            }
169:
170:            public void setMinMaxLength(String sMinMaxLength) {
171:                this .sMinMaxLength = sMinMaxLength;
172:            }
173:
174:            public String getUrl() {
175:                return sUrl;
176:            }
177:
178:            public void setUrl(String sUrl) {
179:                this .sUrl = sUrl;
180:            }
181:
182:            public String getEmail() {
183:                return sEmail;
184:            }
185:
186:            public void setEmail(String sEmail) {
187:                this .sEmail = sEmail;
188:            }
189:
190:            public String getMask() {
191:                return sMask;
192:            }
193:
194:            public void setMask(String sMask) {
195:                this .sMask = sMask;
196:            }
197:
198:            public String getSatisfaction() {
199:                return sSatisfaction;
200:            }
201:
202:            public void setSatisfaction(String sSatisfaction) {
203:                this .sSatisfaction = sSatisfaction;
204:            }
205:
206:            public String[] getOsList() {
207:                return sOsList;
208:            }
209:
210:            public void setOsList(String[] anOsList) {
211:                this .sOsList = anOsList;
212:            }
213:
214:            public String getOverallSatisfaction() {
215:                return sOverallSatisfaction;
216:            }
217:
218:            public void setOverallSatisfaction(String anOverallSatisfaction) {
219:                this .sOverallSatisfaction = anOverallSatisfaction;
220:            }
221:
222:            public String getWouldRecommend() {
223:                return sWouldRecommend;
224:            }
225:
226:            public void setWouldRecommend(String anWouldRecommend) {
227:                this .sWouldRecommend = anWouldRecommend;
228:            }
229:
230:            public String[] getUsedLanguages() {
231:                return sUsedLanguages;
232:            }
233:
234:            public void setUsedLanguages(String[] anUsedLanguages) {
235:                this .sUsedLanguages = anUsedLanguages;
236:            }
237:
238:            public List getNameList() {
239:                return lNames;
240:            }
241:
242:            public void setNameList(List lNames) {
243:                this .lNames = lNames;
244:            }
245:
246:            /**
247:             * Reset all properties to their default values.
248:             *
249:             * @param mapping The mapping used to select this instance
250:             * @param request The servlet request we are processing
251:             */
252:            public void reset(ActionMapping mapping, HttpServletRequest request) {
253:                String reset = (String) request.getAttribute("typeForm.reset");
254:                if ((null != reset) || ("true".equals(reset))) {
255:                    action = null;
256:                    sByte = null;
257:                    sShort = null;
258:                    sInteger = null;
259:                    sIntRange = null;
260:                    sLong = null;
261:                    sFloat = null;
262:                    sFloatRange = null;
263:                    sDouble = null;
264:                    sDate = null;
265:                    sCreditCard = null;
266:                    sMinMaxLength = null;
267:                    sEmail = null;
268:                    sUrl = null;
269:                    sMask = null;
270:                    sSatisfaction = null;
271:                    sOsList = null;
272:                    sOverallSatisfaction = null;
273:                    sUsedLanguages = null;
274:                }
275:                //lNames = initNames();
276:            }
277:
278:            /**
279:             * Initialize list.
280:             * @return empty list of LabelValueBeans
281:             */
282:            private static List initNames() {
283:                List lResults = new ArrayList();
284:
285:                for (int i = 0; i < 3; i++) {
286:                    lResults.add(new LabelValueBean(null, null));
287:                }
288:
289:                return lResults;
290:            }
291:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.