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


001:        /*
002:         * $Id: ELNotPresentTag.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.strutsel.taglib.logic;
022:
023:        import org.apache.struts.taglib.logic.NotPresentTag;
024:        import org.apache.strutsel.taglib.utils.EvalHelper;
025:
026:        import javax.servlet.jsp.JspException;
027:
028:        /**
029:         * Evaluates the nested body content of this tag if the specified value is not
030:         * present for this request. <p> This class is a subclass of the class
031:         * <code>org.apache.struts.taglib.logic.NotPresentTag</code> which provides
032:         * most of the described functionality.  This subclass allows all attribute
033:         * values to be specified as expressions utilizing the JavaServer Pages
034:         * Standard Library expression language.
035:         *
036:         * @version $Rev: 471754 $
037:         */
038:        public class ELNotPresentTag extends NotPresentTag {
039:            /**
040:             * Instance variable mapped to "cookie" tag attribute. (Mapping set in
041:             * associated BeanInfo class.)
042:             */
043:            private String cookieExpr;
044:
045:            /**
046:             * Instance variable mapped to "header" tag attribute. (Mapping set in
047:             * associated BeanInfo class.)
048:             */
049:            private String headerExpr;
050:
051:            /**
052:             * Instance variable mapped to "name" tag attribute. (Mapping set in
053:             * associated BeanInfo class.)
054:             */
055:            private String nameExpr;
056:
057:            /**
058:             * Instance variable mapped to "parameter" tag attribute. (Mapping set in
059:             * associated BeanInfo class.)
060:             */
061:            private String parameterExpr;
062:
063:            /**
064:             * Instance variable mapped to "property" tag attribute. (Mapping set in
065:             * associated BeanInfo class.)
066:             */
067:            private String propertyExpr;
068:
069:            /**
070:             * Instance variable mapped to "role" tag attribute. (Mapping set in
071:             * associated BeanInfo class.)
072:             */
073:            private String roleExpr;
074:
075:            /**
076:             * Instance variable mapped to "scope" tag attribute. (Mapping set in
077:             * associated BeanInfo class.)
078:             */
079:            private String scopeExpr;
080:
081:            /**
082:             * Instance variable mapped to "user" tag attribute. (Mapping set in
083:             * associated BeanInfo class.)
084:             */
085:            private String userExpr;
086:
087:            /**
088:             * Getter method for "cookie" tag attribute. (Mapping set in associated
089:             * BeanInfo class.)
090:             */
091:            public String getCookieExpr() {
092:                return (cookieExpr);
093:            }
094:
095:            /**
096:             * Getter method for "header" tag attribute. (Mapping set in associated
097:             * BeanInfo class.)
098:             */
099:            public String getHeaderExpr() {
100:                return (headerExpr);
101:            }
102:
103:            /**
104:             * Getter method for "name" tag attribute. (Mapping set in associated
105:             * BeanInfo class.)
106:             */
107:            public String getNameExpr() {
108:                return (nameExpr);
109:            }
110:
111:            /**
112:             * Getter method for "parameter" tag attribute. (Mapping set in associated
113:             * BeanInfo class.)
114:             */
115:            public String getParameterExpr() {
116:                return (parameterExpr);
117:            }
118:
119:            /**
120:             * Getter method for "property" tag attribute. (Mapping set in associated
121:             * BeanInfo class.)
122:             */
123:            public String getPropertyExpr() {
124:                return (propertyExpr);
125:            }
126:
127:            /**
128:             * Getter method for "role" tag attribute. (Mapping set in associated
129:             * BeanInfo class.)
130:             */
131:            public String getRoleExpr() {
132:                return (roleExpr);
133:            }
134:
135:            /**
136:             * Getter method for "scope" tag attribute. (Mapping set in associated
137:             * BeanInfo class.)
138:             */
139:            public String getScopeExpr() {
140:                return (scopeExpr);
141:            }
142:
143:            /**
144:             * Getter method for "user" tag attribute. (Mapping set in associated
145:             * BeanInfo class.)
146:             */
147:            public String getUserExpr() {
148:                return (userExpr);
149:            }
150:
151:            /**
152:             * Setter method for "cookie" tag attribute. (Mapping set in associated
153:             * BeanInfo class.)
154:             */
155:            public void setCookieExpr(String cookieExpr) {
156:                this .cookieExpr = cookieExpr;
157:            }
158:
159:            /**
160:             * Setter method for "header" tag attribute. (Mapping set in associated
161:             * BeanInfo class.)
162:             */
163:            public void setHeaderExpr(String headerExpr) {
164:                this .headerExpr = headerExpr;
165:            }
166:
167:            /**
168:             * Setter method for "name" tag attribute. (Mapping set in associated
169:             * BeanInfo class.)
170:             */
171:            public void setNameExpr(String nameExpr) {
172:                this .nameExpr = nameExpr;
173:            }
174:
175:            /**
176:             * Setter method for "parameter" tag attribute. (Mapping set in associated
177:             * BeanInfo class.)
178:             */
179:            public void setParameterExpr(String parameterExpr) {
180:                this .parameterExpr = parameterExpr;
181:            }
182:
183:            /**
184:             * Setter method for "property" tag attribute. (Mapping set in associated
185:             * BeanInfo class.)
186:             */
187:            public void setPropertyExpr(String propertyExpr) {
188:                this .propertyExpr = propertyExpr;
189:            }
190:
191:            /**
192:             * Setter method for "role" tag attribute. (Mapping set in associated
193:             * BeanInfo class.)
194:             */
195:            public void setRoleExpr(String roleExpr) {
196:                this .roleExpr = roleExpr;
197:            }
198:
199:            /**
200:             * Setter method for "scope" tag attribute. (Mapping set in associated
201:             * BeanInfo class.)
202:             */
203:            public void setScopeExpr(String scopeExpr) {
204:                this .scopeExpr = scopeExpr;
205:            }
206:
207:            /**
208:             * Setter method for "user" tag attribute. (Mapping set in associated
209:             * BeanInfo class.)
210:             */
211:            public void setUserExpr(String userExpr) {
212:                this .userExpr = userExpr;
213:            }
214:
215:            /**
216:             * Resets attribute values for tag reuse.
217:             */
218:            public void release() {
219:                super .release();
220:                setCookieExpr(null);
221:                setHeaderExpr(null);
222:                setNameExpr(null);
223:                setParameterExpr(null);
224:                setPropertyExpr(null);
225:                setRoleExpr(null);
226:                setScopeExpr(null);
227:                setUserExpr(null);
228:            }
229:
230:            /**
231:             * Process the start tag.
232:             *
233:             * @throws JspException if a JSP exception has occurred
234:             */
235:            public int doStartTag() throws JspException {
236:                evaluateExpressions();
237:
238:                return (super .doStartTag());
239:            }
240:
241:            /**
242:             * Processes all attribute values which use the JSTL expression evaluation
243:             * engine to determine their values.
244:             *
245:             * @throws JspException if a JSP exception has occurred
246:             */
247:            private void evaluateExpressions() throws JspException {
248:                String string = null;
249:
250:                if ((string = EvalHelper.evalString("cookie", getCookieExpr(),
251:                        this , pageContext)) != null) {
252:                    setCookie(string);
253:                }
254:
255:                if ((string = EvalHelper.evalString("header", getHeaderExpr(),
256:                        this , pageContext)) != null) {
257:                    setHeader(string);
258:                }
259:
260:                if ((string = EvalHelper.evalString("name", getNameExpr(),
261:                        this , pageContext)) != null) {
262:                    setName(string);
263:                }
264:
265:                if ((string = EvalHelper.evalString("parameter",
266:                        getParameterExpr(), this , pageContext)) != null) {
267:                    setParameter(string);
268:                }
269:
270:                if ((string = EvalHelper.evalString("property",
271:                        getPropertyExpr(), this , pageContext)) != null) {
272:                    setProperty(string);
273:                }
274:
275:                if ((string = EvalHelper.evalString("role", getRoleExpr(),
276:                        this , pageContext)) != null) {
277:                    setRole(string);
278:                }
279:
280:                if ((string = EvalHelper.evalString("scope", getScopeExpr(),
281:                        this , pageContext)) != null) {
282:                    setScope(string);
283:                }
284:
285:                if ((string = EvalHelper.evalString("user", getUserExpr(),
286:                        this, pageContext)) != null) {
287:                    setUser(string);
288:                }
289:            }
290:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.