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


001:        /*
002:         * $Id: BaseInputTag.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:        package org.apache.struts.taglib.html;
022:
023:        import org.apache.struts.util.MessageResources;
024:
025:        import javax.servlet.jsp.JspException;
026:
027:        /**
028:         * Abstract base class for the various input tags.
029:         *
030:         * @version $Rev: 471754 $ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
031:         *          $
032:         */
033:        public abstract class BaseInputTag extends BaseHandlerTag {
034:            /**
035:             * The message resources for this package.
036:             */
037:            protected static MessageResources messages = MessageResources
038:                    .getMessageResources(Constants.Package + ".LocalStrings");
039:
040:            // ----------------------------------------------------- Instance Variables
041:
042:            /**
043:             * The number of character columns for this field, or negative for no
044:             * limit.
045:             */
046:            protected String cols = null;
047:
048:            /**
049:             * The maximum number of characters allowed, or negative for no limit.
050:             */
051:            protected String maxlength = null;
052:
053:            /**
054:             * The name of the field (and associated property) being processed.
055:             */
056:            protected String property = null;
057:
058:            /**
059:             * The number of rows for this field, or negative for no limit.
060:             */
061:            protected String rows = null;
062:
063:            /**
064:             * The value for this field, or <code>null</code> to retrieve the
065:             * corresponding property from our associated bean.
066:             */
067:            protected String value = null;
068:
069:            /**
070:             * The name of the bean containing our underlying property.
071:             */
072:            protected String name = Constants.BEAN_KEY;
073:
074:            // ------------------------------------------------------------- Properties
075:            public String getName() {
076:                return (this .name);
077:            }
078:
079:            public void setName(String name) {
080:                this .name = name;
081:            }
082:
083:            /**
084:             * Return the number of columns for this field.
085:             */
086:            public String getCols() {
087:                return (this .cols);
088:            }
089:
090:            /**
091:             * Set the number of columns for this field.
092:             *
093:             * @param cols The new number of columns
094:             */
095:            public void setCols(String cols) {
096:                this .cols = cols;
097:            }
098:
099:            /**
100:             * Return the maximum length allowed.
101:             */
102:            public String getMaxlength() {
103:                return (this .maxlength);
104:            }
105:
106:            /**
107:             * Set the maximum length allowed.
108:             *
109:             * @param maxlength The new maximum length
110:             */
111:            public void setMaxlength(String maxlength) {
112:                this .maxlength = maxlength;
113:            }
114:
115:            /**
116:             * Return the property name.
117:             */
118:            public String getProperty() {
119:                return (this .property);
120:            }
121:
122:            /**
123:             * Set the property name.
124:             *
125:             * @param property The new property name
126:             */
127:            public void setProperty(String property) {
128:                this .property = property;
129:            }
130:
131:            /**
132:             * Return the number of rows for this field.
133:             */
134:            public String getRows() {
135:                return (this .rows);
136:            }
137:
138:            /**
139:             * Set the number of rows for this field.
140:             *
141:             * @param rows The new number of rows
142:             */
143:            public void setRows(String rows) {
144:                this .rows = rows;
145:            }
146:
147:            /**
148:             * Return the size of this field (synonym for <code>getCols()</code>).
149:             */
150:            public String getSize() {
151:                return (getCols());
152:            }
153:
154:            /**
155:             * Set the size of this field (synonym for <code>setCols()</code>).
156:             *
157:             * @param size The new size
158:             */
159:            public void setSize(String size) {
160:                setCols(size);
161:            }
162:
163:            /**
164:             * Return the field value (if any).
165:             */
166:            public String getValue() {
167:                return (this .value);
168:            }
169:
170:            /**
171:             * Set the field value (if any).
172:             *
173:             * @param value The new field value, or <code>null</code> to retrieve the
174:             *              corresponding property from the bean
175:             */
176:            public void setValue(String value) {
177:                this .value = value;
178:            }
179:
180:            // --------------------------------------------------------- Public Methods
181:
182:            /**
183:             * Process the start of this tag.  The default implementation does
184:             * nothing.
185:             *
186:             * @throws JspException if a JSP exception has occurred
187:             */
188:            public int doStartTag() throws JspException {
189:                return (EVAL_BODY_TAG);
190:            }
191:
192:            /**
193:             * Process the end of this tag.  The default implementation does nothing.
194:             *
195:             * @throws JspException if a JSP exception has occurred
196:             */
197:            public int doEndTag() throws JspException {
198:                return (EVAL_PAGE);
199:            }
200:
201:            /**
202:             * Prepare the name element
203:             *
204:             * @return The element name.
205:             */
206:            protected String prepareName() throws JspException {
207:                if (property == null) {
208:                    return null;
209:                }
210:
211:                // * @since Struts 1.1
212:                if (indexed) {
213:                    StringBuffer results = new StringBuffer();
214:
215:                    prepareIndex(results, name);
216:                    results.append(property);
217:
218:                    return results.toString();
219:                }
220:
221:                return property;
222:            }
223:
224:            /**
225:             * Release any acquired resources.
226:             */
227:            public void release() {
228:                super.release();
229:                name = Constants.BEAN_KEY;
230:                cols = null;
231:                maxlength = null;
232:                property = null;
233:                rows = null;
234:                value = null;
235:            }
236:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.