You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/02/10 19:09:25 UTC
svn commit: r376780 [3/3] -
/struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/ELRedirectTagBeanInfo.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/ELRedirectTagBeanInfo.java?rev=376780&r1=376779&r2=376780&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/ELRedirectTagBeanInfo.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/ELRedirectTagBeanInfo.java Fri Feb 10 10:09:22 2006
@@ -1,106 +1,129 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.strutsel.taglib.logic;
-import java.beans.PropertyDescriptor;
import java.beans.IntrospectionException;
-import java.util.ArrayList;
+import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
+import java.util.ArrayList;
+
/**
* This is the <code>BeanInfo</code> descriptor for the
* <code>org.apache.strutsel.taglib.logic.ELRedirectTag</code> class. It is
* needed to override the default mapping of custom tag attribute names to
- * class attribute names.
- *<p>
- * This is because the value of the unevaluated EL expression has to be kept
- * separately from the evaluated value, which is stored in the base class. This
- * is related to the fact that the JSP compiler can choose to reuse different
- * tag instances if they received the same original attribute values, and the
- * JSP compiler can choose to not re-call the setter methods, because it can
- * assume the same values are already set.
+ * class attribute names. <p> This is because the value of the unevaluated EL
+ * expression has to be kept separately from the evaluated value, which is
+ * stored in the base class. This is related to the fact that the JSP compiler
+ * can choose to reuse different tag instances if they received the same
+ * original attribute values, and the JSP compiler can choose to not re-call
+ * the setter methods, because it can assume the same values are already set.
*/
-public class ELRedirectTagBeanInfo extends SimpleBeanInfo
-{
- public PropertyDescriptor[] getPropertyDescriptors()
- {
+public class ELRedirectTagBeanInfo extends SimpleBeanInfo {
+ public PropertyDescriptor[] getPropertyDescriptors() {
ArrayList proplist = new ArrayList();
try {
proplist.add(new PropertyDescriptor("action", ELRedirectTag.class,
- null, "setActionExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setActionExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("anchor", ELRedirectTag.class,
- null, "setAnchorExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setAnchorExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("forward", ELRedirectTag.class,
- null, "setForwardExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setForwardExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("href", ELRedirectTag.class,
- null, "setHrefExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setHrefExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("name", ELRedirectTag.class,
- null, "setNameExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setNameExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("page", ELRedirectTag.class,
- null, "setPageExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setPageExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("paramId", ELRedirectTag.class,
- null, "setParamIdExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setParamIdExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ try {
+ proplist.add(new PropertyDescriptor("paramName",
+ ELRedirectTag.class, null, "setParamNameExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ try {
+ proplist.add(new PropertyDescriptor("paramProperty",
+ ELRedirectTag.class, null, "setParamPropertyExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ try {
+ proplist.add(new PropertyDescriptor("paramScope",
+ ELRedirectTag.class, null, "setParamScopeExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
- proplist.add(new PropertyDescriptor("paramName", ELRedirectTag.class,
- null, "setParamNameExpr"));
- } catch (IntrospectionException ex) {}
- try {
- proplist.add(new PropertyDescriptor("paramProperty", ELRedirectTag.class,
- null, "setParamPropertyExpr"));
- } catch (IntrospectionException ex) {}
- try {
- proplist.add(new PropertyDescriptor("paramScope", ELRedirectTag.class,
- null, "setParamScopeExpr"));
- } catch (IntrospectionException ex) {}
- try {
- proplist.add(new PropertyDescriptor("property", ELRedirectTag.class,
- null, "setPropertyExpr"));
- } catch (IntrospectionException ex) {}
+ proplist.add(new PropertyDescriptor("property",
+ ELRedirectTag.class, null, "setPropertyExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("scope", ELRedirectTag.class,
- null, "setScopeExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setScopeExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
- proplist.add(new PropertyDescriptor("transaction", ELRedirectTag.class,
- null, "setTransactionExpr"));
- } catch (IntrospectionException ex) {}
- try {
- proplist.add(new PropertyDescriptor("useLocalEncoding", ELRedirectTag.class,
- null, "setUseLocalEncodingExpr"));
- } catch (IntrospectionException ex) {}
-
- PropertyDescriptor[] result =
- new PropertyDescriptor[proplist.size()];
+ proplist.add(new PropertyDescriptor("transaction",
+ ELRedirectTag.class, null, "setTransactionExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ try {
+ proplist.add(new PropertyDescriptor("useLocalEncoding",
+ ELRedirectTag.class, null, "setUseLocalEncodingExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
+
return ((PropertyDescriptor[]) proplist.toArray(result));
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/package.html
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/package.html?rev=376780&r1=376779&r2=376780&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/package.html (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/logic/package.html Fri Feb 10 10:09:22 2006
@@ -1,101 +1,124 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
- <head>
- <base/>
- <title>Package Documentation for org.apache.strutsel.taglib.logic Package</title>
- </head>
- <body bgcolor="white">
- <p>
- The "struts-logic-el" tag library contains tags that are useful in managing
- conditional generation of output text, looping over object collections for
- repetitive generation of output text, and application flow management.
- </p>
- <br>
- <a name="doc.Description"></a>
- <div align="Center">
- <a href="#doc.Intro">[Introduction]</a>
- <a href="#doc.Functionality">[Logic-EL Functionality]</a>
- <a href="#doc.Examples">[Logic-EL Examples]</a>
- </div>
- <hr>
- <a name="doc.Intro"></a>
- <h3>Introduction</h3>
- <p>
- The functionality of this tag library is entirely provided by the base
- "struts-logic" tag library in the Struts distribution. This derived tag
- library, "struts-logic-el", only provides a different way to evaluate
- attribute values, which is using the JavaServer Pages Standard Tag Library
- expression language engine, or the "JSTL EL" for short.
- </p>
- <p>
- In general, the tags provided in the "struts-logic-el" library are a direct
- mapping from the "struts-logic" tag library. However, there are several
- tags in the base Struts tag library which were not "ported" to the
- "struts-logic-el" tag library, as it was determined that all of their
- functionality was provided by the JSTL. Information about these
- "non-ported" tags is provided in the information for the
- "org.apache.strutsel" package.
- </p>
- <p>
- In addition, specific to the "struts-logic-el" library, two tags in this
- library have one additional attribute over their counterpart in the base
- Struts tag library. These tags are the <code>match</code> and
- <code>notMatch</code> tags, and the additional attribute is named
- <code>expr</code>, which is a value intended to be evaluated by the JSTL EL
- engine. More details about these tags and their attributes is provided in
- more detailed documentation about the package and its tags.
- </p>
- <a name="doc.Functionality"></a>
- <h3>Logic-EL Functionality</h3>
- <p>
- The functionality of the "logic-el" tags can be almost entirely understood
- from the documentation of the "struts-logic" base tag library. The only
- exception is the new attribute added to the <code>match</code> and
- <code>notMatch</code> tags, being the <code>expr</code> attribute.
- </p>
- <p>
- The <code>match</code> and <code>notMatch</code> tags provide the ability to
- check to see whether a specific value is (or is not) a substring of a value
- obtained from either a cookie, request header, request parameter, or bean
- property. The addition of the <code>expr</code> attribute allows the
- obtained value to come from an arbitrary expression language value.
- </p>
- <a name="doc.Examples"></a>
- <h3>Logic-EL Examples</h3>
- <p>
- The following are discrete examples of uses of the "logic-el" tags, in no
- paticular order, but emphasizing the use of JSTL EL values as attribute
- values.
- </p>
- <p><i>Example:</i></p>
- <pre>
- <logic-el:forward name="${forwardName}"/></pre>
- <p><i>Example:</i></p>
- <pre>
- <%-- Iterates through all HTTP headers. --%>
- <logic-el:iterate id="item" collection="${header}">
+<head>
+ <base/>
+ <title>Package Documentation for org.apache.strutsel.taglib.logic
+ Package</title>
+</head>
+
+<body bgcolor="white">
+<p>
+ The "struts-logic-el" tag library contains tags that are useful in
+ managing
+ conditional generation of output text, looping over object collections for
+ repetitive generation of output text, and application flow management.
+</p>
+<br>
+<a name="doc.Description"></a>
+
+<div align="Center">
+ <a href="#doc.Intro">[Introduction]</a>
+ <a href="#doc.Functionality">[Logic-EL Functionality]</a>
+ <a href="#doc.Examples">[Logic-EL Examples]</a>
+</div>
+<hr>
+<a name="doc.Intro"></a>
+
+<h3>Introduction</h3>
+
+<p>
+ The functionality of this tag library is entirely provided by the base
+ "struts-logic" tag library in the Struts distribution. This derived tag
+ library, "struts-logic-el", only provides a different way to evaluate
+ attribute values, which is using the JavaServer Pages Standard Tag Library
+ expression language engine, or the "JSTL EL" for short.
+</p>
+
+<p>
+ In general, the tags provided in the "struts-logic-el" library are a
+ direct
+ mapping from the "struts-logic" tag library. However, there are several
+ tags in the base Struts tag library which were not "ported" to the
+ "struts-logic-el" tag library, as it was determined that all of their
+ functionality was provided by the JSTL. Information about these
+ "non-ported" tags is provided in the information for the
+ "org.apache.strutsel" package.
+</p>
+
+<p>
+ In addition, specific to the "struts-logic-el" library, two tags in this
+ library have one additional attribute over their counterpart in the base
+ Struts tag library. These tags are the <code>match</code> and
+ <code>notMatch</code> tags, and the additional attribute is named
+ <code>expr</code>, which is a value intended to be evaluated by the JSTL
+ EL
+ engine. More details about these tags and their attributes is provided in
+ more detailed documentation about the package and its tags.
+</p>
+<a name="doc.Functionality"></a>
+
+<h3>Logic-EL Functionality</h3>
+
+<p>
+ The functionality of the "logic-el" tags can be almost entirely understood
+ from the documentation of the "struts-logic" base tag library. The only
+ exception is the new attribute added to the <code>match</code> and
+ <code>notMatch</code> tags, being the <code>expr</code> attribute.
+</p>
+
+<p>
+ The <code>match</code> and <code>notMatch</code> tags provide the ability
+ to
+ check to see whether a specific value is (or is not) a substring of a
+ value
+ obtained from either a cookie, request header, request parameter, or bean
+ property. The addition of the <code>expr</code> attribute allows the
+ obtained value to come from an arbitrary expression language value.
+</p>
+<a name="doc.Examples"></a>
+
+<h3>Logic-EL Examples</h3>
+
+<p>
+ The following are discrete examples of uses of the "logic-el" tags, in no
+ paticular order, but emphasizing the use of JSTL EL values as attribute
+ values.
+</p>
+
+<p><i>Example:</i></p>
+<pre>
+ <logic-el:forward name="${forwardName}"/></pre>
+
+<p><i>Example:</i></p>
+<pre>
+ <%-- Iterates through all HTTP headers. --%>
+ <logic-el:iterate id="item" collection="${header}">
<tr>
- <td><c:out value="${item}.key"/></td>
- <td><c:out value="${item}.value"/></td>
+ <td><c:out value="${item}.key"/></td>
+ <td><c:out value="${item}.value"/></td>
</tr>
- </logic-el:iterate></pre>
- <p><i>Example:</i></p>
- <pre>
- <logic-el:match cookie="${cookieName}" value="${cookieValue}">
+ </logic-el:iterate></pre>
+
+<p><i>Example:</i></p>
+<pre>
+ <logic-el:match cookie="${cookieName}" value="${cookieValue}">
Match succeeded.
- </logic-el:match></pre>
- <p><i>Example:</i></p>
- <pre>
- <logic-el:match expr='${hash["foo"]}' value="${matchValue}">
+ </logic-el:match></pre>
+
+<p><i>Example:</i></p>
+<pre>
+ <logic-el:match expr='${hash["foo"]}' value="${matchValue}">
Match succeeded.
- </logic-el:match></pre>
- <p><i>Example:</i></p>
- <pre>
- <logic-el:messagesPresent property="${messageKey}">
+ </logic-el:match></pre>
+
+<p><i>Example:</i></p>
+<pre>
+ <logic-el:messagesPresent property="${messageKey}">
Message found.
- </logic-el:messagesPresent></pre>
- <p><i>Example:</i></p>
- <pre>
- <logic-el:redirect href="http://localhost:${portnum}/factory" />
- </body>
+ </logic-el:messagesPresent></pre>
+
+<p><i>Example:</i></p>
+<pre>
+ <logic-el:redirect href="http://localhost:${portnum}/factory" />
+</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org