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:08:10 UTC
svn commit: r376778 [1/2] -
/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/
Author: husted
Date: Fri Feb 10 10:08:07 2006
New Revision: 376778
URL: http://svn.apache.org/viewcvs?rev=376778&view=rev
Log:
Checkstyle Roundup
* EL package reformatted with latest Jalopy settings. Stylistic changes only.
Modified:
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTag.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTagBeanInfo.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTag.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTagBeanInfo.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTag.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTagBeanInfo.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTag.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTagBeanInfo.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTag.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTagBeanInfo.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTag.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTagBeanInfo.java
struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/package.html
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTag.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTag.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTag.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTag.java Fri Feb 10 10:08:07 2006
@@ -1,138 +1,173 @@
/*
- * $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.bean;
import org.apache.struts.taglib.bean.IncludeTag;
-import javax.servlet.jsp.JspException;
import org.apache.strutsel.taglib.utils.EvalHelper;
+import javax.servlet.jsp.JspException;
+
/**
- * Generate a URL-encoded include to the specified URI.
- *<p>
- * This class is a subclass of the class
- * <code>org.apache.struts.taglib.bean.IncludeTag</code> which
- * provides most of the described functionality. This subclass allows all
- * attribute values to be specified as expressions utilizing the JavaServer
- * Pages Standard Library expression language.
+ * Generate a URL-encoded include to the specified URI. <p> This class is a
+ * subclass of the class <code>org.apache.struts.taglib.bean.IncludeTag</code>
+ * which provides most of the described functionality. This subclass allows
+ * all attribute values to be specified as expressions utilizing the
+ * JavaServer Pages Standard Library expression language.
*
* @version $Rev$
*/
public class ELIncludeTag extends IncludeTag {
-
/**
- * Instance variable mapped to "anchor" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "anchor" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String anchorExpr;
+
/**
- * Instance variable mapped to "forward" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "forward" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String forwardExpr;
+
/**
- * Instance variable mapped to "href" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "href" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String hrefExpr;
+
/**
- * Instance variable mapped to "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "id" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String idExpr;
+
/**
- * Instance variable mapped to "page" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "page" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String pageExpr;
+
/**
- * Instance variable mapped to "transaction" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "transaction" tag attribute. (Mapping set
+ * in associated BeanInfo class.)
*/
private String transactionExpr;
/**
- * Getter method for "anchor" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "anchor" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getAnchorExpr() { return (anchorExpr); }
+ public String getAnchorExpr() {
+ return (anchorExpr);
+ }
+
/**
- * Getter method for "forward" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "forward" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getForwardExpr() { return (forwardExpr); }
+ public String getForwardExpr() {
+ return (forwardExpr);
+ }
+
/**
- * Getter method for "href" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "href" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getHrefExpr() { return (hrefExpr); }
+ public String getHrefExpr() {
+ return (hrefExpr);
+ }
+
/**
- * Getter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getIdExpr() { return (idExpr); }
+ public String getIdExpr() {
+ return (idExpr);
+ }
+
/**
- * Getter method for "page" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "page" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getPageExpr() { return (pageExpr); }
+ public String getPageExpr() {
+ return (pageExpr);
+ }
+
/**
- * Getter method for "transaction" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "transaction" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
- public String getTransactionExpr() { return (transactionExpr); }
+ public String getTransactionExpr() {
+ return (transactionExpr);
+ }
/**
- * Setter method for "anchor" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "anchor" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setAnchorExpr(String anchorExpr) { this.anchorExpr = anchorExpr; }
+ public void setAnchorExpr(String anchorExpr) {
+ this.anchorExpr = anchorExpr;
+ }
+
/**
- * Setter method for "forward" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "forward" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setForwardExpr(String forwardExpr) { this.forwardExpr = forwardExpr; }
+ public void setForwardExpr(String forwardExpr) {
+ this.forwardExpr = forwardExpr;
+ }
+
/**
- * Setter method for "href" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "href" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setHrefExpr(String hrefExpr) { this.hrefExpr = hrefExpr; }
+ public void setHrefExpr(String hrefExpr) {
+ this.hrefExpr = hrefExpr;
+ }
+
/**
- * Setter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
+ public void setIdExpr(String idExpr) {
+ this.idExpr = idExpr;
+ }
+
/**
- * Setter method for "page" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "page" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setPageExpr(String pageExpr) { this.pageExpr = pageExpr; }
+ public void setPageExpr(String pageExpr) {
+ this.pageExpr = pageExpr;
+ }
+
/**
- * Setter method for "transaction" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "transaction" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
- public void setTransactionExpr(String transactionExpr) { this.transactionExpr = transactionExpr; }
+ public void setTransactionExpr(String transactionExpr) {
+ this.transactionExpr = transactionExpr;
+ }
/**
* Resets attribute values for tag reuse.
*/
- public void release()
- {
+ public void release() {
super.release();
setAnchorExpr(null);
setForwardExpr(null);
@@ -145,10 +180,11 @@
/**
* Process the start tag.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
public int doStartTag() throws JspException {
evaluateExpressions();
+
return (super.doStartTag());
}
@@ -156,34 +192,44 @@
* Processes all attribute values which use the JSTL expression evaluation
* engine to determine their values.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
- private void evaluateExpressions() throws JspException {
- String string = null;
- Boolean bool = null;
-
- if ((string = EvalHelper.evalString("anchor", getAnchorExpr(),
- this, pageContext)) != null)
+ private void evaluateExpressions()
+ throws JspException {
+ String string = null;
+ Boolean bool = null;
+
+ if ((string =
+ EvalHelper.evalString("anchor", getAnchorExpr(), this,
+ pageContext)) != null) {
setAnchor(string);
+ }
- if ((string = EvalHelper.evalString("forward", getForwardExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("forward", getForwardExpr(), this,
+ pageContext)) != null) {
setForward(string);
+ }
- if ((string = EvalHelper.evalString("href", getHrefExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("href", getHrefExpr(), this, pageContext)) != null) {
setHref(string);
+ }
- if ((string = EvalHelper.evalString("id", getIdExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("id", getIdExpr(), this, pageContext)) != null) {
setId(string);
+ }
- if ((string = EvalHelper.evalString("page", getPageExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("page", getPageExpr(), this, pageContext)) != null) {
setPage(string);
+ }
- if ((bool = EvalHelper.evalBoolean("transaction", getTransactionExpr(),
- this, pageContext)) != null)
+ if ((bool =
+ EvalHelper.evalBoolean("transaction", getTransactionExpr(),
+ this, pageContext)) != null) {
setTransaction(bool.booleanValue());
+ }
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTagBeanInfo.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTagBeanInfo.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTagBeanInfo.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELIncludeTagBeanInfo.java Fri Feb 10 10:08:07 2006
@@ -1,75 +1,81 @@
/*
- * $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.bean;
-import java.beans.PropertyDescriptor;
import java.beans.IntrospectionException;
+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.bean.ELIncludeTag</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 ELIncludeTagBeanInfo extends SimpleBeanInfo
-{
- public PropertyDescriptor[] getPropertyDescriptors()
- {
- ArrayList proplist = new ArrayList();
+public class ELIncludeTagBeanInfo extends SimpleBeanInfo {
+ public PropertyDescriptor[] getPropertyDescriptors() {
+ ArrayList proplist = new ArrayList();
try {
proplist.add(new PropertyDescriptor("anchor", ELIncludeTag.class,
- null, "setAnchorExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setAnchorExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("forward", ELIncludeTag.class,
- null, "setForwardExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setForwardExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("href", ELIncludeTag.class,
- null, "setHrefExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setHrefExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
- proplist.add(new PropertyDescriptor("id", ELIncludeTag.class,
- null, "setIdExpr"));
- } catch (IntrospectionException ex) {}
+ proplist.add(new PropertyDescriptor("id", ELIncludeTag.class, null,
+ "setIdExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("page", ELIncludeTag.class,
- null, "setPageExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setPageExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("transaction",
- ELIncludeTag.class,
- null, "setTransactionExpr"));
- } catch (IntrospectionException ex) {}
+ ELIncludeTag.class, null, "setTransactionExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
- PropertyDescriptor[] result =
- new PropertyDescriptor[proplist.size()];
return ((PropertyDescriptor[]) proplist.toArray(result));
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTag.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTag.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTag.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTag.java Fri Feb 10 10:08:07 2006
@@ -1,217 +1,286 @@
/*
- * $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.bean;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.bean.MessageTag;
import org.apache.strutsel.taglib.utils.EvalHelper;
+import javax.servlet.jsp.JspException;
+
/**
* Custom tag that retrieves an internationalized messages string (with
* optional parametric replacement) from the <code>ActionResources</code>
* object stored as a context attribute by our associated
- * <code>ActionServlet</code> implementation.
- *<p>
- * This class is a subclass of the class
- * <code>org.apache.struts.taglib.bean.MessageTag</code> which provides most of
- * the described functionality. This subclass allows all attribute values to
- * be specified as expressions utilizing the JavaServer Pages Standard Library
- * expression language.
+ * <code>ActionServlet</code> implementation. <p> This class is a subclass of
+ * the class <code>org.apache.struts.taglib.bean.MessageTag</code> which
+ * provides most of the described functionality. This subclass allows all
+ * attribute values to be specified as expressions utilizing the JavaServer
+ * Pages Standard Library expression language.
*
* @version $Rev$
*/
public class ELMessageTag extends MessageTag {
-
/**
- * Instance variable mapped to "arg0" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "arg0" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String arg0Expr;
+
/**
- * Instance variable mapped to "arg1" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "arg1" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String arg1Expr;
+
/**
- * Instance variable mapped to "arg2" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "arg2" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String arg2Expr;
+
/**
- * Instance variable mapped to "arg3" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "arg3" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String arg3Expr;
+
/**
- * Instance variable mapped to "arg4" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "arg4" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String arg4Expr;
+
/**
- * Instance variable mapped to "bundle" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "bundle" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String bundleExpr;
+
/**
- * Instance variable mapped to "key" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "key" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String keyExpr;
+
/**
- * Instance variable mapped to "locale" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "locale" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String localeExpr;
+
/**
- * Instance variable mapped to "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "name" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String nameExpr;
+
/**
- * Instance variable mapped to "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "property" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String propertyExpr;
+
/**
- * Instance variable mapped to "scope" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "scope" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String scopeExpr;
/**
- * Getter method for "arg0" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "arg0" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getArg0Expr() { return (arg0Expr); }
+ public String getArg0Expr() {
+ return (arg0Expr);
+ }
+
/**
- * Getter method for "arg1" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "arg1" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getArg1Expr() { return (arg1Expr); }
+ public String getArg1Expr() {
+ return (arg1Expr);
+ }
+
/**
- * Getter method for "arg2" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "arg2" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getArg2Expr() { return (arg2Expr); }
+ public String getArg2Expr() {
+ return (arg2Expr);
+ }
+
/**
- * Getter method for "arg3" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "arg3" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getArg3Expr() { return (arg3Expr); }
+ public String getArg3Expr() {
+ return (arg3Expr);
+ }
+
/**
- * Getter method for "arg4" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "arg4" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getArg4Expr() { return (arg4Expr); }
+ public String getArg4Expr() {
+ return (arg4Expr);
+ }
+
/**
- * Getter method for "bundle" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "bundle" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getBundleExpr() { return (bundleExpr); }
+ public String getBundleExpr() {
+ return (bundleExpr);
+ }
+
/**
- * Getter method for "key" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "key" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getKeyExpr() { return (keyExpr); }
+ public String getKeyExpr() {
+ return (keyExpr);
+ }
+
/**
- * Getter method for "locale" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "locale" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getLocaleExpr() { return (localeExpr); }
+ public String getLocaleExpr() {
+ return (localeExpr);
+ }
+
/**
- * Getter method for "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "name" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getNameExpr() { return (nameExpr); }
+ public String getNameExpr() {
+ return (nameExpr);
+ }
+
/**
- * Getter method for "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "property" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getPropertyExpr() { return (propertyExpr); }
+ public String getPropertyExpr() {
+ return (propertyExpr);
+ }
+
/**
- * Getter method for "scope" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "scope" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getScopeExpr() { return (scopeExpr); }
+ public String getScopeExpr() {
+ return (scopeExpr);
+ }
/**
- * Setter method for "arg0" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "arg0" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setArg0Expr(String arg0Expr) { this.arg0Expr = arg0Expr; }
+ public void setArg0Expr(String arg0Expr) {
+ this.arg0Expr = arg0Expr;
+ }
+
/**
- * Setter method for "arg1" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "arg1" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setArg1Expr(String arg1Expr) { this.arg1Expr = arg1Expr; }
+ public void setArg1Expr(String arg1Expr) {
+ this.arg1Expr = arg1Expr;
+ }
+
/**
- * Setter method for "arg2" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "arg2" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setArg2Expr(String arg2Expr) { this.arg2Expr = arg2Expr; }
+ public void setArg2Expr(String arg2Expr) {
+ this.arg2Expr = arg2Expr;
+ }
+
/**
- * Setter method for "arg3" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "arg3" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setArg3Expr(String arg3Expr) { this.arg3Expr = arg3Expr; }
+ public void setArg3Expr(String arg3Expr) {
+ this.arg3Expr = arg3Expr;
+ }
+
/**
- * Setter method for "arg4" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "arg4" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setArg4Expr(String arg4Expr) { this.arg4Expr = arg4Expr; }
+ public void setArg4Expr(String arg4Expr) {
+ this.arg4Expr = arg4Expr;
+ }
+
/**
- * Setter method for "bundle" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "bundle" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; }
+ public void setBundleExpr(String bundleExpr) {
+ this.bundleExpr = bundleExpr;
+ }
+
/**
- * Setter method for "key" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "key" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setKeyExpr(String keyExpr) { this.keyExpr = keyExpr; }
+ public void setKeyExpr(String keyExpr) {
+ this.keyExpr = keyExpr;
+ }
+
/**
- * Setter method for "locale" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "locale" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setLocaleExpr(String localeExpr) { this.localeExpr = localeExpr; }
+ public void setLocaleExpr(String localeExpr) {
+ this.localeExpr = localeExpr;
+ }
+
/**
- * Setter method for "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "name" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; }
+ public void setNameExpr(String nameExpr) {
+ this.nameExpr = nameExpr;
+ }
+
/**
- * Setter method for "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "property" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; }
+ public void setPropertyExpr(String propertyExpr) {
+ this.propertyExpr = propertyExpr;
+ }
+
/**
- * Setter method for "scope" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "scope" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setScopeExpr(String scopeExpr) { this.scopeExpr = scopeExpr; }
+ public void setScopeExpr(String scopeExpr) {
+ this.scopeExpr = scopeExpr;
+ }
/**
* Resets attribute values for tag reuse.
*/
- public void release()
- {
+ public void release() {
super.release();
setArg0Expr(null);
setArg1Expr(null);
@@ -225,14 +294,15 @@
setPropertyExpr(null);
setScopeExpr(null);
}
-
+
/**
* Process the start tag.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
public int doStartTag() throws JspException {
evaluateExpressions();
+
return (super.doStartTag());
}
@@ -240,54 +310,68 @@
* Processes all attribute values which use the JSTL expression evaluation
* engine to determine their values.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
- private void evaluateExpressions() throws JspException {
- String string = null;
-
+ private void evaluateExpressions()
+ throws JspException {
+ String string = null;
- if ((string = EvalHelper.evalString("arg0", getArg0Expr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("arg0", getArg0Expr(), this, pageContext)) != null) {
setArg0(string);
+ }
- if ((string = EvalHelper.evalString("arg1", getArg1Expr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("arg1", getArg1Expr(), this, pageContext)) != null) {
setArg1(string);
+ }
- if ((string = EvalHelper.evalString("arg2", getArg2Expr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("arg2", getArg2Expr(), this, pageContext)) != null) {
setArg2(string);
+ }
- if ((string = EvalHelper.evalString("arg3", getArg3Expr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("arg3", getArg3Expr(), this, pageContext)) != null) {
setArg3(string);
+ }
- if ((string = EvalHelper.evalString("arg4", getArg4Expr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("arg4", getArg4Expr(), this, pageContext)) != null) {
setArg4(string);
+ }
- if ((string = EvalHelper.evalString("bundle", getBundleExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("bundle", getBundleExpr(), this,
+ pageContext)) != null) {
setBundle(string);
+ }
- if ((string = EvalHelper.evalString("key", getKeyExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("key", getKeyExpr(), this, pageContext)) != null) {
setKey(string);
+ }
- if ((string = EvalHelper.evalString("locale", getLocaleExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("locale", getLocaleExpr(), this,
+ pageContext)) != null) {
setLocale(string);
+ }
- if ((string = EvalHelper.evalString("name", getNameExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("name", getNameExpr(), this, pageContext)) != null) {
setName(string);
+ }
- if ((string = EvalHelper.evalString("property", getPropertyExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("property", getPropertyExpr(), this,
+ pageContext)) != null) {
setProperty(string);
+ }
- if ((string = EvalHelper.evalString("scope", getScopeExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("scope", getScopeExpr(), this, pageContext)) != null) {
setScope(string);
+ }
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTagBeanInfo.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTagBeanInfo.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTagBeanInfo.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELMessageTagBeanInfo.java Fri Feb 10 10:08:07 2006
@@ -1,87 +1,106 @@
/*
- * $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.bean;
-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.bean.ELMessageTag</code> class. It is
* needed to override the default mapping of custom tag attribute names to
* class attribute names.
*/
-public class ELMessageTagBeanInfo extends SimpleBeanInfo
-{
- public PropertyDescriptor[] getPropertyDescriptors()
- {
+public class ELMessageTagBeanInfo extends SimpleBeanInfo {
+ public PropertyDescriptor[] getPropertyDescriptors() {
ArrayList proplist = new ArrayList();
try {
proplist.add(new PropertyDescriptor("arg0", ELMessageTag.class,
- null, "setArg0Expr"));
- } catch (IntrospectionException ex) {}
+ null, "setArg0Expr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("arg1", ELMessageTag.class,
- null, "setArg1Expr"));
- } catch (IntrospectionException ex) {}
+ null, "setArg1Expr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("arg2", ELMessageTag.class,
- null, "setArg2Expr"));
- } catch (IntrospectionException ex) {}
+ null, "setArg2Expr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("arg3", ELMessageTag.class,
- null, "setArg3Expr"));
- } catch (IntrospectionException ex) {}
+ null, "setArg3Expr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("arg4", ELMessageTag.class,
- null, "setArg4Expr"));
- } catch (IntrospectionException ex) {}
+ null, "setArg4Expr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("bundle", ELMessageTag.class,
- null, "setBundleExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setBundleExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("key", ELMessageTag.class,
- null, "setKeyExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setKeyExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("locale", ELMessageTag.class,
- null, "setLocaleExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setLocaleExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("name", ELMessageTag.class,
- null, "setNameExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setNameExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("property", ELMessageTag.class,
- null, "setPropertyExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setPropertyExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("scope", ELMessageTag.class,
- null, "setScopeExpr"));
- } catch (IntrospectionException ex) {}
-
- PropertyDescriptor[] result =
- new PropertyDescriptor[proplist.size()];
+ null, "setScopeExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
+
return ((PropertyDescriptor[]) proplist.toArray(result));
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTag.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTag.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTag.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTag.java Fri Feb 10 10:08:07 2006
@@ -1,91 +1,99 @@
/*
- * $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.bean;
import org.apache.struts.taglib.bean.PageTag;
-import javax.servlet.jsp.JspException;
import org.apache.strutsel.taglib.utils.EvalHelper;
+import javax.servlet.jsp.JspException;
+
/**
- * Define a scripting variable that exposes the requested page context
- * item as a scripting variable and a page scope bean.
- *<p>
- * This class is a subclass of the class
- * <code>org.apache.struts.taglib.bean.PageTag</code> which provides most of
- * the described functionality. This subclass allows all attribute values to
- * be specified as expressions utilizing the JavaServer Pages Standard Library
- * expression language.
+ * Define a scripting variable that exposes the requested page context item as
+ * a scripting variable and a page scope bean. <p> This class is a subclass of
+ * the class <code>org.apache.struts.taglib.bean.PageTag</code> which provides
+ * most of the described functionality. This subclass allows all attribute
+ * values to be specified as expressions utilizing the JavaServer Pages
+ * Standard Library expression language.
*
* @version $Rev$
*/
public class ELPageTag extends PageTag {
-
/**
- * Instance variable mapped to "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "id" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String idExpr;
+
/**
- * Instance variable mapped to "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "property" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String propertyExpr;
/**
- * Getter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getIdExpr() { return (idExpr); }
+ public String getIdExpr() {
+ return (idExpr);
+ }
+
/**
- * Getter method for "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "property" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getPropertyExpr() { return (propertyExpr); }
+ public String getPropertyExpr() {
+ return (propertyExpr);
+ }
/**
- * Setter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
+ public void setIdExpr(String idExpr) {
+ this.idExpr = idExpr;
+ }
+
/**
- * Setter method for "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "property" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; }
+ public void setPropertyExpr(String propertyExpr) {
+ this.propertyExpr = propertyExpr;
+ }
/**
* Resets attribute values for tag reuse.
*/
- public void release()
- {
+ public void release() {
super.release();
setIdExpr(null);
setPropertyExpr(null);
}
-
+
/**
* Process the start tag.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
public int doStartTag() throws JspException {
evaluateExpressions();
+
return (super.doStartTag());
}
@@ -93,18 +101,21 @@
* Processes all attribute values which use the JSTL expression evaluation
* engine to determine their values.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
- private void evaluateExpressions() throws JspException {
- String string = null;
-
+ private void evaluateExpressions()
+ throws JspException {
+ String string = null;
- if ((string = EvalHelper.evalString("id", getIdExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("id", getIdExpr(), this, pageContext)) != null) {
setId(string);
+ }
- if ((string = EvalHelper.evalString("property", getPropertyExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("property", getPropertyExpr(), this,
+ pageContext)) != null) {
setProperty(string);
+ }
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTagBeanInfo.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTagBeanInfo.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTagBeanInfo.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELPageTagBeanInfo.java Fri Feb 10 10:08:07 2006
@@ -1,51 +1,52 @@
/*
- * $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.bean;
-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.bean.ELPageTag</code> class. It is
- * needed to override the default mapping of custom tag attribute names to
- * class attribute names.
+ * <code>org.apache.strutsel.taglib.bean.ELPageTag</code> class. It is needed
+ * to override the default mapping of custom tag attribute names to class
+ * attribute names.
*/
-public class ELPageTagBeanInfo extends SimpleBeanInfo
-{
- public PropertyDescriptor[] getPropertyDescriptors()
- {
+public class ELPageTagBeanInfo extends SimpleBeanInfo {
+ public PropertyDescriptor[] getPropertyDescriptors() {
ArrayList proplist = new ArrayList();
try {
- proplist.add(new PropertyDescriptor("id", ELPageTag.class,
- null, "setIdExpr"));
- } catch (IntrospectionException ex) {}
+ proplist.add(new PropertyDescriptor("id", ELPageTag.class, null,
+ "setIdExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("property", ELPageTag.class,
- null, "setPropertyExpr"));
- } catch (IntrospectionException ex) {}
-
- PropertyDescriptor[] result =
- new PropertyDescriptor[proplist.size()];
+ null, "setPropertyExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
+
return ((PropertyDescriptor[]) proplist.toArray(result));
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTag.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTag.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTag.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTag.java Fri Feb 10 10:08:07 2006
@@ -1,107 +1,122 @@
/*
- * $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.bean;
import org.apache.struts.taglib.bean.ResourceTag;
-import javax.servlet.jsp.JspException;
import org.apache.strutsel.taglib.utils.EvalHelper;
+import javax.servlet.jsp.JspException;
+
/**
- * Define a scripting variable based on the contents of the specified
- * web application resource.
- *<p>
- * This class is a subclass of the class
- * <code>org.apache.struts.taglib.bean.ResourceTag</code> which provides most of
- * the described functionality. This subclass allows all attribute values to
- * be specified as expressions utilizing the JavaServer Pages Standard Library
- * expression language.
+ * Define a scripting variable based on the contents of the specified web
+ * application resource. <p> This class is a subclass of the class
+ * <code>org.apache.struts.taglib.bean.ResourceTag</code> which provides most
+ * of the described functionality. This subclass allows all attribute values
+ * to be specified as expressions utilizing the JavaServer Pages Standard
+ * Library expression language.
*
* @version $Rev$
*/
public class ELResourceTag extends ResourceTag {
-
/**
- * Instance variable mapped to "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "id" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String idExpr;
+
/**
- * Instance variable mapped to "input" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "input" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String inputExpr;
+
/**
- * Instance variable mapped to "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "name" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String nameExpr;
/**
- * Getter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getIdExpr() { return (idExpr); }
+ public String getIdExpr() {
+ return (idExpr);
+ }
+
/**
- * Getter method for "input" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "input" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getInputExpr() { return (inputExpr); }
+ public String getInputExpr() {
+ return (inputExpr);
+ }
+
/**
- * Getter method for "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "name" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getNameExpr() { return (nameExpr); }
+ public String getNameExpr() {
+ return (nameExpr);
+ }
/**
- * Setter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
+ public void setIdExpr(String idExpr) {
+ this.idExpr = idExpr;
+ }
+
/**
- * Setter method for "input" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "input" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setInputExpr(String inputExpr) { this.inputExpr = inputExpr; }
+ public void setInputExpr(String inputExpr) {
+ this.inputExpr = inputExpr;
+ }
+
/**
- * Setter method for "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "name" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; }
+ public void setNameExpr(String nameExpr) {
+ this.nameExpr = nameExpr;
+ }
/**
* Resets attribute values for tag reuse.
*/
- public void release()
- {
+ public void release() {
super.release();
setIdExpr(null);
setInputExpr(null);
setNameExpr(null);
}
-
+
/**
* Process the start tag.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
public int doStartTag() throws JspException {
evaluateExpressions();
+
return (super.doStartTag());
}
@@ -109,21 +124,25 @@
* Processes all attribute values which use the JSTL expression evaluation
* engine to determine their values.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
- private void evaluateExpressions() throws JspException {
- String string = null;
+ private void evaluateExpressions()
+ throws JspException {
+ String string = null;
- if ((string = EvalHelper.evalString("id", getIdExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("id", getIdExpr(), this, pageContext)) != null) {
setId(string);
+ }
- if ((string = EvalHelper.evalString("input", getInputExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("input", getInputExpr(), this, pageContext)) != null) {
setInput(string);
+ }
- if ((string = EvalHelper.evalString("name", getNameExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("name", getNameExpr(), this, pageContext)) != null) {
setName(string);
+ }
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTagBeanInfo.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTagBeanInfo.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTagBeanInfo.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELResourceTagBeanInfo.java Fri Feb 10 10:08:07 2006
@@ -1,55 +1,58 @@
/*
- * $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.bean;
-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.bean.ELResourceTag</code> class. It is
* needed to override the default mapping of custom tag attribute names to
* class attribute names.
*/
-public class ELResourceTagBeanInfo extends SimpleBeanInfo
-{
- public PropertyDescriptor[] getPropertyDescriptors()
- {
+public class ELResourceTagBeanInfo extends SimpleBeanInfo {
+ public PropertyDescriptor[] getPropertyDescriptors() {
ArrayList proplist = new ArrayList();
try {
proplist.add(new PropertyDescriptor("id", ELResourceTag.class,
- null, "setIdExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setIdExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("input", ELResourceTag.class,
- null, "setInputExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setInputExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("name", ELResourceTag.class,
- null, "setNameExpr"));
- } catch (IntrospectionException ex) {}
-
- PropertyDescriptor[] result =
- new PropertyDescriptor[proplist.size()];
+ null, "setNameExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
+
return ((PropertyDescriptor[]) proplist.toArray(result));
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTag.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTag.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTag.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTag.java Fri Feb 10 10:08:07 2006
@@ -1,124 +1,152 @@
/*
- * $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.bean;
import org.apache.struts.taglib.bean.SizeTag;
-import javax.servlet.jsp.JspException;
import org.apache.strutsel.taglib.utils.EvalHelper;
+import javax.servlet.jsp.JspException;
+
/**
- * Define a scripting variable that will contain the number of elements
- * found in a specified array, Collection, or Map.
- *<p>
- * This class is a subclass of the class
- * <code>org.apache.struts.taglib.bean.SizeTag</code> which provides most of
- * the described functionality. This subclass allows all attribute values to
- * be specified as expressions utilizing the JavaServer Pages Standard Library
- * expression language.
+ * Define a scripting variable that will contain the number of elements found
+ * in a specified array, Collection, or Map. <p> This class is a subclass of
+ * the class <code>org.apache.struts.taglib.bean.SizeTag</code> which provides
+ * most of the described functionality. This subclass allows all attribute
+ * values to be specified as expressions utilizing the JavaServer Pages
+ * Standard Library expression language.
*
* @version $Rev$
*/
public class ELSizeTag extends SizeTag {
-
/**
- * Instance variable mapped to "collection" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "collection" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String collectionExpr;
+
/**
- * Instance variable mapped to "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "id" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String idExpr;
+
/**
- * Instance variable mapped to "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "name" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String nameExpr;
+
/**
- * Instance variable mapped to "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "property" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String propertyExpr;
+
/**
- * Instance variable mapped to "scope" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "scope" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String scopeExpr;
/**
- * Getter method for "collection" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "collection" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
- public String getCollectionExpr() { return (collectionExpr); }
+ public String getCollectionExpr() {
+ return (collectionExpr);
+ }
+
/**
- * Getter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getIdExpr() { return (idExpr); }
+ public String getIdExpr() {
+ return (idExpr);
+ }
+
/**
- * Getter method for "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "name" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getNameExpr() { return (nameExpr); }
+ public String getNameExpr() {
+ return (nameExpr);
+ }
+
/**
- * Getter method for "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "property" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getPropertyExpr() { return (propertyExpr); }
+ public String getPropertyExpr() {
+ return (propertyExpr);
+ }
+
/**
- * Getter method for "scope" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "scope" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getScopeExpr() { return (scopeExpr); }
+ public String getScopeExpr() {
+ return (scopeExpr);
+ }
/**
- * Setter method for "collection" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "collection" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
- public void setCollectionExpr(String collectionExpr) { this.collectionExpr = collectionExpr; }
+ public void setCollectionExpr(String collectionExpr) {
+ this.collectionExpr = collectionExpr;
+ }
+
/**
- * Setter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
+ public void setIdExpr(String idExpr) {
+ this.idExpr = idExpr;
+ }
+
/**
- * Setter method for "name" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "name" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; }
+ public void setNameExpr(String nameExpr) {
+ this.nameExpr = nameExpr;
+ }
+
/**
- * Setter method for "property" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "property" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; }
+ public void setPropertyExpr(String propertyExpr) {
+ this.propertyExpr = propertyExpr;
+ }
+
/**
- * Setter method for "scope" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "scope" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setScopeExpr(String scopeExpr) { this.scopeExpr = scopeExpr; }
+ public void setScopeExpr(String scopeExpr) {
+ this.scopeExpr = scopeExpr;
+ }
/**
* Releases state of custom tag so this instance can be reused.
*/
- public void release()
- {
+ public void release() {
super.release();
setCollectionExpr(null);
setIdExpr(null);
@@ -126,14 +154,15 @@
setPropertyExpr(null);
setScopeExpr(null);
}
-
+
/**
* Process the start tag.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
public int doStartTag() throws JspException {
evaluateExpressions();
+
return (super.doStartTag());
}
@@ -141,30 +170,38 @@
* Processes all attribute values which use the JSTL expression evaluation
* engine to determine their values.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
- private void evaluateExpressions() throws JspException {
- String string = null;
- Object object = null;
-
- if ((object = EvalHelper.eval("collection", getCollectionExpr(),
- this, pageContext)) != null)
+ private void evaluateExpressions()
+ throws JspException {
+ String string = null;
+ Object object = null;
+
+ if ((object =
+ EvalHelper.eval("collection", getCollectionExpr(), this,
+ pageContext)) != null) {
setCollection(object);
+ }
- if ((string = EvalHelper.evalString("id", getIdExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("id", getIdExpr(), this, pageContext)) != null) {
setId(string);
+ }
- if ((string = EvalHelper.evalString("name", getNameExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("name", getNameExpr(), this, pageContext)) != null) {
setName(string);
+ }
- if ((string = EvalHelper.evalString("property", getPropertyExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("property", getPropertyExpr(), this,
+ pageContext)) != null) {
setProperty(string);
+ }
- if ((string = EvalHelper.evalString("scope", getScopeExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("scope", getScopeExpr(), this, pageContext)) != null) {
setScope(string);
+ }
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTagBeanInfo.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTagBeanInfo.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTagBeanInfo.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELSizeTagBeanInfo.java Fri Feb 10 10:08:07 2006
@@ -1,70 +1,75 @@
/*
- * $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.bean;
import java.beans.IntrospectionException;
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.bean.ELSizeTag</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.
+ * 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 ELSizeTagBeanInfo extends SimpleBeanInfo
-{
- public PropertyDescriptor[] getPropertyDescriptors()
- {
+public class ELSizeTagBeanInfo extends SimpleBeanInfo {
+ public PropertyDescriptor[] getPropertyDescriptors() {
ArrayList proplist = new ArrayList();
try {
proplist.add(new PropertyDescriptor("collection", ELSizeTag.class,
- null, "setCollectionExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setCollectionExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
- proplist.add(new PropertyDescriptor("id", ELSizeTag.class,
- null, "setIdExpr"));
- } catch (IntrospectionException ex) {}
+ proplist.add(new PropertyDescriptor("id", ELSizeTag.class, null,
+ "setIdExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
- proplist.add(new PropertyDescriptor("name", ELSizeTag.class,
- null, "setNameExpr"));
- } catch (IntrospectionException ex) {}
+ proplist.add(new PropertyDescriptor("name", ELSizeTag.class, null,
+ "setNameExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("property", ELSizeTag.class,
- null, "setPropertyExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setPropertyExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
- proplist.add(new PropertyDescriptor("scope", ELSizeTag.class,
- null, "setScopeExpr"));
- } catch (IntrospectionException ex) {}
-
- PropertyDescriptor[] result =
- new PropertyDescriptor[proplist.size()];
+ proplist.add(new PropertyDescriptor("scope", ELSizeTag.class, null,
+ "setScopeExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
+
return ((PropertyDescriptor[]) proplist.toArray(result));
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTag.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTag.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTag.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTag.java Fri Feb 10 10:08:07 2006
@@ -1,32 +1,30 @@
/*
- * $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.bean;
import org.apache.struts.taglib.bean.StrutsTag;
-import javax.servlet.jsp.JspException;
import org.apache.strutsel.taglib.utils.EvalHelper;
+import javax.servlet.jsp.JspException;
+
/**
- * Define a scripting variable that exposes the requested Struts
- * internal configuraton object.
- *<p>
- * This class is a subclass of the class
+ * Define a scripting variable that exposes the requested Struts internal
+ * configuraton object. <p> This class is a subclass of the class
* <code>org.apache.struts.taglib.bean.StrutsTag</code> which provides most of
* the described functionality. This subclass allows all attribute values to
* be specified as expressions utilizing the JavaServer Pages Standard Library
@@ -35,89 +33,113 @@
* @version $Rev$
*/
public class ELStrutsTag extends StrutsTag {
-
/**
- * Instance variable mapped to "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "id" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String idExpr;
+
/**
- * Instance variable mapped to "formBean" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "formBean" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String formBeanExpr;
+
/**
- * Instance variable mapped to "forward" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "forward" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String forwardExpr;
+
/**
- * Instance variable mapped to "mapping" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Instance variable mapped to "mapping" tag attribute. (Mapping set in
+ * associated BeanInfo class.)
*/
private String mappingExpr;
/**
- * Getter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getIdExpr() { return (idExpr); }
+ public String getIdExpr() {
+ return (idExpr);
+ }
+
/**
- * Getter method for "formBean" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "formBean" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getFormBeanExpr() { return (formBeanExpr); }
+ public String getFormBeanExpr() {
+ return (formBeanExpr);
+ }
+
/**
- * Getter method for "forward" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "forward" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getForwardExpr() { return (forwardExpr); }
+ public String getForwardExpr() {
+ return (forwardExpr);
+ }
+
/**
- * Getter method for "mapping" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Getter method for "mapping" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public String getMappingExpr() { return (mappingExpr); }
+ public String getMappingExpr() {
+ return (mappingExpr);
+ }
/**
- * Setter method for "id" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "id" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setIdExpr(String idExpr) { this.idExpr = idExpr; }
+ public void setIdExpr(String idExpr) {
+ this.idExpr = idExpr;
+ }
+
/**
- * Setter method for "formBean" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "formBean" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setFormBeanExpr(String formBeanExpr) { this.formBeanExpr = formBeanExpr; }
+ public void setFormBeanExpr(String formBeanExpr) {
+ this.formBeanExpr = formBeanExpr;
+ }
+
/**
- * Setter method for "forward" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "forward" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setForwardExpr(String forwardExpr) { this.forwardExpr = forwardExpr; }
+ public void setForwardExpr(String forwardExpr) {
+ this.forwardExpr = forwardExpr;
+ }
+
/**
- * Setter method for "mapping" tag attribute.
- * (Mapping set in associated BeanInfo class.)
+ * Setter method for "mapping" tag attribute. (Mapping set in associated
+ * BeanInfo class.)
*/
- public void setMappingExpr(String mappingExpr) { this.mappingExpr = mappingExpr; }
+ public void setMappingExpr(String mappingExpr) {
+ this.mappingExpr = mappingExpr;
+ }
/**
* Resets attribute values for tag reuse.
*/
- public void release()
- {
+ public void release() {
super.release();
setIdExpr(null);
setFormBeanExpr(null);
setForwardExpr(null);
setMappingExpr(null);
}
-
+
/**
* Process the start tag.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
public int doStartTag() throws JspException {
evaluateExpressions();
+
return (super.doStartTag());
}
@@ -125,25 +147,33 @@
* Processes all attribute values which use the JSTL expression evaluation
* engine to determine their values.
*
- * @exception JspException if a JSP exception has occurred
+ * @throws JspException if a JSP exception has occurred
*/
- private void evaluateExpressions() throws JspException {
- String string = null;
+ private void evaluateExpressions()
+ throws JspException {
+ String string = null;
- if ((string = EvalHelper.evalString("id", getIdExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("id", getIdExpr(), this, pageContext)) != null) {
setId(string);
+ }
- if ((string = EvalHelper.evalString("formBean", getFormBeanExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("formBean", getFormBeanExpr(), this,
+ pageContext)) != null) {
setFormBean(string);
+ }
- if ((string = EvalHelper.evalString("forward", getForwardExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("forward", getForwardExpr(), this,
+ pageContext)) != null) {
setForward(string);
+ }
- if ((string = EvalHelper.evalString("mapping", getMappingExpr(),
- this, pageContext)) != null)
+ if ((string =
+ EvalHelper.evalString("mapping", getMappingExpr(), this,
+ pageContext)) != null) {
setMapping(string);
+ }
}
}
Modified: struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTagBeanInfo.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTagBeanInfo.java?rev=376778&r1=376777&r2=376778&view=diff
==============================================================================
--- struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTagBeanInfo.java (original)
+++ struts/el/trunk/src/java/org/apache/strutsel/taglib/bean/ELStrutsTagBeanInfo.java Fri Feb 10 10:08:07 2006
@@ -1,59 +1,64 @@
/*
- * $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.bean;
-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.bean.ELStrutsTag</code> class. It is
* needed to override the default mapping of custom tag attribute names to
* class attribute names.
*/
-public class ELStrutsTagBeanInfo extends SimpleBeanInfo
-{
- public PropertyDescriptor[] getPropertyDescriptors()
- {
+public class ELStrutsTagBeanInfo extends SimpleBeanInfo {
+ public PropertyDescriptor[] getPropertyDescriptors() {
ArrayList proplist = new ArrayList();
try {
- proplist.add(new PropertyDescriptor("id", ELStrutsTag.class,
- null, "setIdExpr"));
- } catch (IntrospectionException ex) {}
+ proplist.add(new PropertyDescriptor("id", ELStrutsTag.class, null,
+ "setIdExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("formBean", ELStrutsTag.class,
- null, "setFormBeanExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setFormBeanExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("forward", ELStrutsTag.class,
- null, "setForwardExpr"));
- } catch (IntrospectionException ex) {}
+ null, "setForwardExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
try {
proplist.add(new PropertyDescriptor("mapping", ELStrutsTag.class,
- null, "setMappingExpr"));
- } catch (IntrospectionException ex) {}
-
- PropertyDescriptor[] result =
- new PropertyDescriptor[proplist.size()];
+ null, "setMappingExpr"));
+ } catch (IntrospectionException ex) {
+ }
+
+ PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
+
return ((PropertyDescriptor[]) proplist.toArray(result));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org