Source Code Cross Referenced for PropertyForm.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 property.  This form has the following fields,
011:         * with default values in square brackets:
012:         * <ul>
013:         * <li><b>key</b> - The property key.  [REQUIRED]
014:         * <li><b>value</b> - The property value.  [REQUIRED]
015:         * </ul>
016:         *
017:         * @author Miguel Valdes Faura
018:         * @version $Revision: 1.1 $ $Date: 2004/07/30 14:57:57 $
019:         */
020:
021:        public final class PropertyForm extends ActionForm {
022:
023:            // --------------------------------------------------- Instance Variables
024:
025:            /**
026:             * The property key.
027:             */
028:            private String key = null;
029:
030:            /**
031:             * The property value
032:             */
033:            private String value = null;
034:
035:            // ----------------------------------------------------------- Properties
036:
037:            /**
038:             * Return the property key.
039:             */
040:            public String getKey() {
041:
042:                return (this .key);
043:            }
044:
045:            /**
046:             * Set the property key.
047:             *
048:             * @param key The new property key
049:             */
050:            public void setKey(String key) {
051:
052:                this .key = key;
053:            }
054:
055:            /**
056:             * Return the property value.
057:             */
058:            public String getValue() {
059:
060:                return (this .value);
061:            }
062:
063:            /**
064:             * Set the property value.
065:             *
066:             * @param value The new property value
067:             */
068:            public void setValue(String value) {
069:
070:                this .value = value;
071:            }
072:
073:            // --------------------------------------------------------- Public Methods
074:
075:            /**
076:             * Reset all properties to their default values.
077:             *
078:             * @param mapping The mapping used to select this instance
079:             * @param request The servlet request we are processing
080:             */
081:            public void reset(ActionMapping mapping, HttpServletRequest request) {
082:
083:                this .key = null;
084:                this .value = null;
085:            }
086:
087:            /**
088:             * Validate the properties that have been set from this HTTP request,
089:             * and return an <code>ActionErrors</code> object that encapsulates any
090:             * validation errors that have been found.  If no errors are found, return
091:             * <code>null</code> or an <code>ActionErrors</code> object with no
092:             * recorded error messages.
093:             *
094:             * @param mapping The mapping used to select this instance
095:             * @param request The servlet request we are processing
096:             */
097:            public ActionErrors validate(ActionMapping mapping,
098:                    HttpServletRequest request) {
099:
100:                ActionErrors errors = new ActionErrors();
101:
102:                if (key == null || key.length() == 0)
103:                    errors.add("key", new ActionError("error.key.required"));
104:                if (value == null || value.length() == 0)
105:                    errors
106:                            .add("value", new ActionError(
107:                                    "error.value.required"));
108:
109:                return (errors);
110:
111:            }
112:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.