Source Code Cross Referenced for InputTag.java in  » J2EE » Sofia » com » salmonllc » wml » tags » 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 » J2EE » Sofia » com.salmonllc.wml.tags 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //** Copyright Statement ***************************************************
002:        // Licensed Material - Property of Salmon LLC
003:        // (C) Copyright Salmon LLC. 1999 - All Rights Reserved
004:        // For more information go to www.salmonllc.com
005:        //
006:        // *************************************************************************
007:        // DISCLAIMER:
008:        // The following code has been created by Salmon LLC. The code is provided
009:        // 'AS IS' , without warranty of any kind unless covered in another agreement
010:        // between your corporation and Salmon LLC.  Salmon LLC shall not be liable
011:        // for any damages arising out of your use of this, even if they have been
012:        // advised of the possibility of such damages.
013:        //** End Copyright Statement ***************************************************
014:        package com.salmonllc.wml.tags;
015:
016:        ////////////////////////////////////////////////////////////
017:        //$Archive: /SOFIA/SourceCode/com/salmonllc/wml/tags/InputTag.java $
018:        //$Author: Srufle $
019:        //$Revision: 5 $
020:        //$Modtime: 4/15/03 10:25a $
021:        ////////////////////////////////////////////////////////////
022:
023:        import com.salmonllc.html.HtmlComponent;
024:        import com.salmonllc.jsp.tags.BaseEmptyTag;
025:        import com.salmonllc.jsp.tags.BaseTagHelper;
026:        import com.salmonllc.wml.WmlPasswordEdit;
027:        import com.salmonllc.wml.WmlTextEdit;
028:
029:        /**
030:         * This tag approximately corresponds to the WML tag "INPUT"
031:         */
032:
033:        public class InputTag extends BaseEmptyTag {
034:
035:            private String _enabled;
036:
037:            private String _maxLength;
038:            private String _size;
039:
040:            private String _type;
041:
042:            private String _value;
043:
044:            private String _dataSource;
045:            private String _class;
046:            private String _format;
047:            private String _emptyok;
048:            private String _tabindex;
049:            private String _title;
050:
051:            /**
052:             * Creates the component to be used by the tag.
053:             */
054:            public HtmlComponent createComponent() {
055:                if (_type == null)
056:                    return null;
057:
058:                String type = _type.toUpperCase();
059:                if (type.equals("PASSWORD")) {
060:                    WmlPasswordEdit pass = new WmlPasswordEdit(getName(),
061:                            getHelper().getController());
062:                    pass.setSize(BaseTagHelper.stringToInt(_size, 0));
063:                    pass.setMaxLength(BaseTagHelper.stringToInt(_maxLength, 0));
064:                    pass.setValue(_value);
065:                    pass.setVisible(BaseTagHelper.stringToBoolean(getVisible(),
066:                            true));
067:                    if (_dataSource != null)
068:                        pass.setDataSource(_dataSource);
069:                    pass.setClassName(_class);
070:                    pass.setFormat(_format);
071:                    pass.setEmptyOk(BaseTagHelper.stringToBoolean(_emptyok,
072:                            false));
073:                    pass.setTabIndex(BaseTagHelper.stringToInt(_tabindex));
074:                    pass.setTitle(_title);
075:                    CardTag cTag = (CardTag) findAncestorWithClass(this ,
076:                            CardTag.class);
077:                    cTag.getCard().addInputComponent(pass);
078:                    return pass;
079:                } else if (type.equals("TEXT")) {
080:                    WmlTextEdit edit = new WmlTextEdit(getName(), getHelper()
081:                            .getController());
082:                    edit.setSize(BaseTagHelper.stringToInt(_size));
083:                    edit.setMaxLength(BaseTagHelper.stringToInt(_maxLength));
084:                    edit.setValue(_value);
085:                    edit.setVisible(BaseTagHelper.stringToBoolean(getVisible(),
086:                            true));
087:                    if (_dataSource != null)
088:                        edit.setDataSource(_dataSource);
089:
090:                    edit.setClassName(_class);
091:                    edit.setFormat(_format);
092:                    edit.setEmptyOk(BaseTagHelper.stringToBoolean(_emptyok,
093:                            false));
094:                    edit.setTabIndex(BaseTagHelper.stringToInt(_tabindex));
095:                    edit.setTitle(_title);
096:                    CardTag cTag = (CardTag) findAncestorWithClass(this ,
097:                            CardTag.class);
098:                    cTag.getCard().addInputComponent(edit);
099:                    return edit;
100:                }
101:                return null;
102:            }
103:
104:            /**
105:             * get the tag's classname attribute
106:             */
107:            public String getClassname() {
108:                return _class;
109:            }
110:
111:            /**
112:             * Get the Data Source the component should be bound to
113:             */
114:            public String getDatasource() {
115:                return _dataSource;
116:            }
117:
118:            /**
119:             * get the tag's enabled attribute
120:             */
121:            public String getEnabled() {
122:                return _enabled;
123:            }
124:
125:            /**
126:             * Returns the length of the field
127:             */
128:            public String getLength() {
129:                return _maxLength;
130:            }
131:
132:            /**
133:             * Set the tag's maxlength attribute
134:             */
135:            public String getMaxlength() {
136:                return _maxLength;
137:            }
138:
139:            /**
140:             * Get the tag's type attribute
141:             */
142:            public String getType() {
143:                return _type;
144:            }
145:
146:            /**
147:             * Get the tag's value attribute
148:             */
149:            public String getValue() {
150:                return _value;
151:            }
152:
153:            /**
154:             * Get the tag's format attribute
155:             */
156:            public String getFormat() {
157:                return _format;
158:            }
159:
160:            /**
161:             * Get the tag's emptyok attribute
162:             */
163:            public String getEmptyok() {
164:                return _emptyok;
165:            }
166:
167:            /**
168:             * Get the tag's tabindex attribute
169:             */
170:            public String getTabindex() {
171:                return _tabindex;
172:            }
173:
174:            /**
175:             * Get the tag's title attribute
176:             */
177:            public String getTitle() {
178:                return _title;
179:            }
180:
181:            /**
182:             * Release all resources used by the tag.
183:             */
184:            public void release() {
185:                super .release();
186:                _maxLength = null;
187:                _size = null;
188:                _type = null;
189:                _value = null;
190:                _emptyok = null;
191:                _format = null;
192:                _dataSource = null;
193:                _tabindex = null;
194:                _class = null;
195:                _dataSource = null;
196:                _enabled = null;
197:                _size = null;
198:                _title = null;
199:            }
200:
201:            /**
202:             * Set the tag's classname attribute
203:             */
204:            public void setClassname(String sClass) {
205:                _class = sClass;
206:            }
207:
208:            /**
209:             * Set the Data Source the component should be bound to
210:             */
211:            public void setDatasource(String val) {
212:                _dataSource = val;
213:            }
214:
215:            /**
216:             * Set the tag's enabled attribute
217:             */
218:            public void setEnabled(String val) {
219:                _enabled = val;
220:            }
221:
222:            /**
223:             * Sets the length of the field
224:             */
225:            public void setLength(String newLength) {
226:                _maxLength = newLength;
227:            }
228:
229:            /**
230:             * Set the tag's maxLength attribute
231:             */
232:            public void setMaxlength(String maxLength) {
233:                _maxLength = maxLength;
234:            }
235:
236:            /**
237:             * Set the tag's size attribute
238:             */
239:            public void setSize(String size) {
240:                _size = size;
241:            }
242:
243:            /**
244:             * Set the tag's type attribute
245:             */
246:
247:            public void setType(String type) {
248:                _type = type;
249:            }
250:
251:            /**
252:             * Set the tag's value attribute
253:             */
254:
255:            public void setValue(String value) {
256:                _value = value;
257:            }
258:
259:            /**
260:             * Set the tag's format attribute
261:             */
262:
263:            public void setFormat(String _format) {
264:                this ._format = _format;
265:            }
266:
267:            /**
268:             * Set the tag's emptyok attribute
269:             */
270:            public void setEmptyok(String _emptyok) {
271:                this ._emptyok = _emptyok;
272:            }
273:
274:            /**
275:             * Set the tag's tabindex attribute
276:             */
277:            public void setTabindex(String _tabindex) {
278:                this ._tabindex = _tabindex;
279:            }
280:
281:            /**
282:             * Set the tag's title attribute
283:             */
284:            public void setTitle(String _title) {
285:                this._title = _title;
286:            }
287:
288:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.