You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jb...@apache.org on 2010/11/20 19:14:04 UTC
svn commit: r1037284 [10/12] - in /tomcat/taglibs/standard/trunk/jstlel: ./
src/main/java/org/apache/taglibs/standard/lang/jstl/
src/main/java/org/apache/taglibs/standard/lang/jstl/parser/
src/main/java/org/apache/taglibs/standard/lang/support/ src/mai...
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatDateTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatDateTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatDateTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatDateTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -38,10 +38,10 @@ public class FormatDateTag extends Forma
private String value_; // stores EL-based property
private String type_; // stores EL-based property
- private String dateStyle_; // stores EL-based property
- private String timeStyle_; // stores EL-based property
- private String pattern_; // stores EL-based property
- private String timeZone_; // stores EL-based property
+ private String dateStyle_; // stores EL-based property
+ private String timeStyle_; // stores EL-based property
+ private String pattern_; // stores EL-based property
+ private String timeZone_; // stores EL-based property
//*********************************************************************
@@ -62,16 +62,18 @@ public class FormatDateTag extends Forma
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -82,31 +84,37 @@ public class FormatDateTag extends Forma
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
}
// for EL-based attribute
+
public void setType(String type_) {
this.type_ = type_;
}
// for EL-based attribute
+
public void setDateStyle(String dateStyle_) {
this.dateStyle_ = dateStyle_;
}
// for EL-based attribute
+
public void setTimeStyle(String timeStyle_) {
this.timeStyle_ = timeStyle_;
}
// for EL-based attribute
+
public void setPattern(String pattern_) {
this.pattern_ = pattern_;
}
// for EL-based attribute
+
public void setTimeZone(String timeZone_) {
this.timeZone_ = timeZone_;
}
@@ -116,12 +124,14 @@ public class FormatDateTag extends Forma
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = type_ = dateStyle_ = timeStyle_ = pattern_ = timeZone_ = null;
+ value_ = type_ = dateStyle_ = timeStyle_ = pattern_ = timeZone_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -131,38 +141,38 @@ public class FormatDateTag extends Forma
* propagate up.
*/
- // 'value' attribute (mandatory)
- value = (Date) ExpressionEvaluatorManager.evaluate(
- "value", value_, Date.class, this, pageContext);
-
- // 'type' attribute
- if (type_ != null) {
- type = (String) ExpressionEvaluatorManager.evaluate(
- "type", type_, String.class, this, pageContext);
- }
-
- // 'dateStyle' attribute
- if (dateStyle_ != null) {
- dateStyle = (String) ExpressionEvaluatorManager.evaluate(
- "dateStyle", dateStyle_, String.class, this, pageContext);
- }
-
- // 'timeStyle' attribute
- if (timeStyle_ != null) {
- timeStyle = (String) ExpressionEvaluatorManager.evaluate(
- "timeStyle", timeStyle_, String.class, this, pageContext);
- }
-
- // 'pattern' attribute
- if (pattern_ != null) {
- pattern = (String) ExpressionEvaluatorManager.evaluate(
- "pattern", pattern_, String.class, this, pageContext);
- }
-
- // 'timeZone' attribute
- if (timeZone_ != null) {
- timeZone = ExpressionEvaluatorManager.evaluate(
- "timeZone", timeZone_, Object.class, this, pageContext);
- }
+ // 'value' attribute (mandatory)
+ value = (Date) ExpressionEvaluatorManager.evaluate(
+ "value", value_, Date.class, this, pageContext);
+
+ // 'type' attribute
+ if (type_ != null) {
+ type = (String) ExpressionEvaluatorManager.evaluate(
+ "type", type_, String.class, this, pageContext);
+ }
+
+ // 'dateStyle' attribute
+ if (dateStyle_ != null) {
+ dateStyle = (String) ExpressionEvaluatorManager.evaluate(
+ "dateStyle", dateStyle_, String.class, this, pageContext);
+ }
+
+ // 'timeStyle' attribute
+ if (timeStyle_ != null) {
+ timeStyle = (String) ExpressionEvaluatorManager.evaluate(
+ "timeStyle", timeStyle_, String.class, this, pageContext);
+ }
+
+ // 'pattern' attribute
+ if (pattern_ != null) {
+ pattern = (String) ExpressionEvaluatorManager.evaluate(
+ "pattern", pattern_, String.class, this, pageContext);
+ }
+
+ // 'timeZone' attribute
+ if (timeZone_ != null) {
+ timeZone = ExpressionEvaluatorManager.evaluate(
+ "timeZone", timeZone_, Object.class, this, pageContext);
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatNumberTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatNumberTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatNumberTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/FormatNumberTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -36,14 +36,14 @@ public class FormatNumberTag extends For
private String value_; // stores EL-based property
private String type_; // stores EL-based property
- private String pattern_; // stores EL-based property
- private String currencyCode_; // stores EL-based property
- private String currencySymbol_; // stores EL-based property
- private String groupingUsed_; // stores EL-based property
- private String maxIntegerDigits_; // stores EL-based property
- private String minIntegerDigits_; // stores EL-based property
- private String maxFractionDigits_; // stores EL-based property
- private String minFractionDigits_; // stores EL-based property
+ private String pattern_; // stores EL-based property
+ private String currencyCode_; // stores EL-based property
+ private String currencySymbol_; // stores EL-based property
+ private String groupingUsed_; // stores EL-based property
+ private String maxIntegerDigits_; // stores EL-based property
+ private String minIntegerDigits_; // stores EL-based property
+ private String maxFractionDigits_; // stores EL-based property
+ private String minFractionDigits_; // stores EL-based property
//*********************************************************************
@@ -64,16 +64,18 @@ public class FormatNumberTag extends For
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -84,59 +86,69 @@ public class FormatNumberTag extends For
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
- this.valueSpecified = true;
+ this.valueSpecified = true;
}
// for EL-based attribute
+
public void setType(String type_) {
this.type_ = type_;
}
// for EL-based attribute
+
public void setPattern(String pattern_) {
this.pattern_ = pattern_;
}
// for EL-based attribute
+
public void setCurrencyCode(String currencyCode_) {
this.currencyCode_ = currencyCode_;
}
// for EL-based attribute
+
public void setCurrencySymbol(String currencySymbol_) {
this.currencySymbol_ = currencySymbol_;
}
// for EL-based attribute
+
public void setGroupingUsed(String groupingUsed_) {
this.groupingUsed_ = groupingUsed_;
- this.groupingUsedSpecified = true;
+ this.groupingUsedSpecified = true;
}
// for EL-based attribute
+
public void setMaxIntegerDigits(String maxIntegerDigits_) {
this.maxIntegerDigits_ = maxIntegerDigits_;
- this.maxIntegerDigitsSpecified = true;
+ this.maxIntegerDigitsSpecified = true;
}
// for EL-based attribute
+
public void setMinIntegerDigits(String minIntegerDigits_) {
this.minIntegerDigits_ = minIntegerDigits_;
- this.minIntegerDigitsSpecified = true;
+ this.minIntegerDigitsSpecified = true;
}
// for EL-based attribute
+
public void setMaxFractionDigits(String maxFractionDigits_) {
this.maxFractionDigits_ = maxFractionDigits_;
- this.maxFractionDigitsSpecified = true;
+ this.maxFractionDigitsSpecified = true;
}
// for EL-based attribute
+
public void setMinFractionDigits(String minFractionDigits_) {
this.minFractionDigits_ = minFractionDigits_;
- this.minFractionDigitsSpecified = true;
+ this.minFractionDigitsSpecified = true;
}
@@ -144,18 +156,20 @@ public class FormatNumberTag extends For
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = type_ = pattern_ = null;
- currencyCode_ = currencySymbol_ = null;
- groupingUsed_ = null;
- maxIntegerDigits_ = minIntegerDigits_ = null;
- maxFractionDigits_ = minFractionDigits_ = null;
+ value_ = type_ = pattern_ = null;
+ currencyCode_ = currencySymbol_ = null;
+ groupingUsed_ = null;
+ maxIntegerDigits_ = minIntegerDigits_ = null;
+ maxFractionDigits_ = minFractionDigits_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
- Object obj = null;
+ Object obj = null;
/*
* Note: we don't check for type mismatches here; we assume
@@ -165,87 +179,87 @@ public class FormatNumberTag extends For
* propagate up.
*/
- // 'value' attribute
- if (value_ != null) {
- value = ExpressionEvaluatorManager.evaluate(
- "value", value_, Object.class, this, pageContext);
- }
-
- // 'type' attribute
- if (type_ != null) {
- type = (String) ExpressionEvaluatorManager.evaluate(
- "type", type_, String.class, this, pageContext);
- }
-
- // 'pattern' attribute
- if (pattern_ != null) {
- pattern = (String) ExpressionEvaluatorManager.evaluate(
- "pattern", pattern_, String.class, this, pageContext);
- }
-
- // 'currencyCode' attribute
- if (currencyCode_ != null) {
- currencyCode = (String) ExpressionEvaluatorManager.evaluate(
- "currencyCode", currencyCode_, String.class, this,
- pageContext);
- }
-
- // 'currencySymbol' attribute
- if (currencySymbol_ != null) {
- currencySymbol = (String) ExpressionEvaluatorManager.evaluate(
- "currencySymbol", currencySymbol_, String.class, this,
- pageContext);
- }
-
- // 'groupingUsed' attribute
- if (groupingUsed_ != null) {
- obj = ExpressionEvaluatorManager.evaluate(
- "groupingUsed", groupingUsed_, Boolean.class, this,
- pageContext);
- if (obj != null) {
- isGroupingUsed = ((Boolean) obj).booleanValue();
- }
- }
-
- // 'maxIntegerDigits' attribute
- if (maxIntegerDigits_ != null) {
- obj = ExpressionEvaluatorManager.evaluate(
- "maxIntegerDigits", maxIntegerDigits_, Integer.class, this,
- pageContext);
- if (obj != null) {
- maxIntegerDigits = ((Integer) obj).intValue();
- }
- }
-
- // 'minIntegerDigits' attribute
- if (minIntegerDigits_ != null) {
- obj = ExpressionEvaluatorManager.evaluate(
- "minIntegerDigits", minIntegerDigits_, Integer.class, this,
- pageContext);
- if (obj != null) {
- minIntegerDigits = ((Integer) obj).intValue();
- }
- }
-
- // 'maxFractionDigits' attribute
- if (maxFractionDigits_ != null) {
- obj = ExpressionEvaluatorManager.evaluate(
- "maxFractionDigits", maxFractionDigits_, Integer.class, this,
- pageContext);
- if (obj != null) {
- maxFractionDigits = ((Integer) obj).intValue();
- }
- }
-
- // 'minFractionDigits' attribute
- if (minFractionDigits_ != null) {
- obj = ExpressionEvaluatorManager.evaluate(
- "minFractionDigits", minFractionDigits_, Integer.class, this,
- pageContext);
- if (obj != null) {
- minFractionDigits = ((Integer) obj).intValue();
- }
- }
+ // 'value' attribute
+ if (value_ != null) {
+ value = ExpressionEvaluatorManager.evaluate(
+ "value", value_, Object.class, this, pageContext);
+ }
+
+ // 'type' attribute
+ if (type_ != null) {
+ type = (String) ExpressionEvaluatorManager.evaluate(
+ "type", type_, String.class, this, pageContext);
+ }
+
+ // 'pattern' attribute
+ if (pattern_ != null) {
+ pattern = (String) ExpressionEvaluatorManager.evaluate(
+ "pattern", pattern_, String.class, this, pageContext);
+ }
+
+ // 'currencyCode' attribute
+ if (currencyCode_ != null) {
+ currencyCode = (String) ExpressionEvaluatorManager.evaluate(
+ "currencyCode", currencyCode_, String.class, this,
+ pageContext);
+ }
+
+ // 'currencySymbol' attribute
+ if (currencySymbol_ != null) {
+ currencySymbol = (String) ExpressionEvaluatorManager.evaluate(
+ "currencySymbol", currencySymbol_, String.class, this,
+ pageContext);
+ }
+
+ // 'groupingUsed' attribute
+ if (groupingUsed_ != null) {
+ obj = ExpressionEvaluatorManager.evaluate(
+ "groupingUsed", groupingUsed_, Boolean.class, this,
+ pageContext);
+ if (obj != null) {
+ isGroupingUsed = ((Boolean) obj).booleanValue();
+ }
+ }
+
+ // 'maxIntegerDigits' attribute
+ if (maxIntegerDigits_ != null) {
+ obj = ExpressionEvaluatorManager.evaluate(
+ "maxIntegerDigits", maxIntegerDigits_, Integer.class, this,
+ pageContext);
+ if (obj != null) {
+ maxIntegerDigits = ((Integer) obj).intValue();
+ }
+ }
+
+ // 'minIntegerDigits' attribute
+ if (minIntegerDigits_ != null) {
+ obj = ExpressionEvaluatorManager.evaluate(
+ "minIntegerDigits", minIntegerDigits_, Integer.class, this,
+ pageContext);
+ if (obj != null) {
+ minIntegerDigits = ((Integer) obj).intValue();
+ }
+ }
+
+ // 'maxFractionDigits' attribute
+ if (maxFractionDigits_ != null) {
+ obj = ExpressionEvaluatorManager.evaluate(
+ "maxFractionDigits", maxFractionDigits_, Integer.class, this,
+ pageContext);
+ if (obj != null) {
+ maxFractionDigits = ((Integer) obj).intValue();
+ }
+ }
+
+ // 'minFractionDigits' attribute
+ if (minFractionDigits_ != null) {
+ obj = ExpressionEvaluatorManager.evaluate(
+ "minFractionDigits", minFractionDigits_, Integer.class, this,
+ pageContext);
+ if (obj != null) {
+ minFractionDigits = ((Integer) obj).intValue();
+ }
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/MessageTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/MessageTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/MessageTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/MessageTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -36,7 +36,7 @@ public class MessageTag extends MessageS
// Private state (implementation details)
private String key_; // stores EL-based property
- private String bundle_; // stores EL-based property
+ private String bundle_; // stores EL-based property
//*********************************************************************
@@ -57,16 +57,18 @@ public class MessageTag extends MessageS
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -77,12 +79,14 @@ public class MessageTag extends MessageS
// Accessor methods
// for EL-based attribute
+
public void setKey(String key_) {
this.key_ = key_;
- this.keySpecified = true;
+ this.keySpecified = true;
}
// for EL-based attribute
+
public void setBundle(String bundle_) {
this.bundle_ = bundle_;
this.bundleSpecified = true;
@@ -93,12 +97,14 @@ public class MessageTag extends MessageS
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- key_ = bundle_ = null;
+ key_ = bundle_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -108,16 +114,16 @@ public class MessageTag extends MessageS
* propagate up.
*/
- if (keySpecified) {
- keyAttrValue = (String) ExpressionEvaluatorManager.evaluate(
- "key", key_, String.class, this, pageContext);
- }
-
- if (bundleSpecified) {
- bundleAttrValue = (LocalizationContext)
- ExpressionEvaluatorManager.evaluate(
- "bundle", bundle_, LocalizationContext.class, this,
- pageContext);
- }
+ if (keySpecified) {
+ keyAttrValue = (String) ExpressionEvaluatorManager.evaluate(
+ "key", key_, String.class, this, pageContext);
+ }
+
+ if (bundleSpecified) {
+ bundleAttrValue = (LocalizationContext)
+ ExpressionEvaluatorManager.evaluate(
+ "bundle", bundle_, LocalizationContext.class, this,
+ pageContext);
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParamTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParamTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParamTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParamTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -55,16 +55,18 @@ public class ParamTag extends ParamSuppo
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -75,9 +77,10 @@ public class ParamTag extends ParamSuppo
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
- this.valueSpecified = true;
+ this.valueSpecified = true;
}
@@ -85,12 +88,14 @@ public class ParamTag extends ParamSuppo
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = null;
+ value_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -100,9 +105,9 @@ public class ParamTag extends ParamSuppo
* propagate up.
*/
- if (value_ != null) {
- value = ExpressionEvaluatorManager.evaluate(
- "value", value_, Object.class, this, pageContext);
- }
+ if (value_ != null) {
+ value = ExpressionEvaluatorManager.evaluate(
+ "value", value_, Object.class, this, pageContext);
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseDateTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseDateTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseDateTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseDateTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -39,11 +39,11 @@ public class ParseDateTag extends ParseD
private String value_; // stores EL-based property
private String type_; // stores EL-based property
- private String dateStyle_; // stores EL-based property
- private String timeStyle_; // stores EL-based property
- private String pattern_; // stores EL-based property
- private String timeZone_; // stores EL-based property
- private String parseLocale_; // stores EL-based property
+ private String dateStyle_; // stores EL-based property
+ private String timeStyle_; // stores EL-based property
+ private String pattern_; // stores EL-based property
+ private String timeZone_; // stores EL-based property
+ private String parseLocale_; // stores EL-based property
//*********************************************************************
@@ -64,16 +64,18 @@ public class ParseDateTag extends ParseD
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -84,37 +86,44 @@ public class ParseDateTag extends ParseD
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
- this.valueSpecified = true;
+ this.valueSpecified = true;
}
// for EL-based attribute
+
public void setType(String type_) {
this.type_ = type_;
}
// for EL-based attribute
+
public void setDateStyle(String dateStyle_) {
this.dateStyle_ = dateStyle_;
}
// for EL-based attribute
+
public void setTimeStyle(String timeStyle_) {
this.timeStyle_ = timeStyle_;
}
// for EL-based attribute
+
public void setPattern(String pattern_) {
this.pattern_ = pattern_;
}
// for EL-based attribute
+
public void setTimeZone(String timeZone_) {
this.timeZone_ = timeZone_;
}
// for EL-based attribute
+
public void setParseLocale(String parseLocale_) {
this.parseLocale_ = parseLocale_;
}
@@ -124,13 +133,15 @@ public class ParseDateTag extends ParseD
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = type_ = dateStyle_ = timeStyle_ = pattern_ = timeZone_ = null;
- parseLocale_ = null;
+ value_ = type_ = dateStyle_ = timeStyle_ = pattern_ = timeZone_ = null;
+ parseLocale_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -140,56 +151,56 @@ public class ParseDateTag extends ParseD
* propagate up.
*/
- // 'value' attribute
- if (value_ != null) {
- value = (String) ExpressionEvaluatorManager.evaluate(
- "value", value_, String.class, this, pageContext);
- }
-
- // 'type' attribute
- if (type_ != null) {
- type = (String) ExpressionEvaluatorManager.evaluate(
- "type", type_, String.class, this, pageContext);
- }
-
- // 'dateStyle' attribute
- if (dateStyle_ != null) {
- dateStyle = (String) ExpressionEvaluatorManager.evaluate(
- "dateStyle", dateStyle_, String.class, this, pageContext);
- }
-
- // 'timeStyle' attribute
- if (timeStyle_ != null) {
- timeStyle = (String) ExpressionEvaluatorManager.evaluate(
- "timeStyle", timeStyle_, String.class, this, pageContext);
- }
-
- // 'pattern' attribute
- if (pattern_ != null) {
- pattern = (String) ExpressionEvaluatorManager.evaluate(
- "pattern", pattern_, String.class, this, pageContext);
- }
-
- // 'timeZone' attribute
- if (timeZone_ != null) {
- timeZone = ExpressionEvaluatorManager.evaluate(
- "timeZone", timeZone_, Object.class, this, pageContext);
- }
-
- // 'parseLocale' attribute
- if (parseLocale_ != null) {
- Object obj = ExpressionEvaluatorManager.evaluate(
- "parseLocale", parseLocale_, Object.class, this, pageContext);
- if (obj != null) {
- if (obj instanceof Locale) {
- parseLocale = (Locale) obj;
- } else {
- String localeStr = (String) obj;
- if (!"".equals(localeStr)) {
- parseLocale = SetLocaleSupport.parseLocale(localeStr);
- }
- }
- }
- }
+ // 'value' attribute
+ if (value_ != null) {
+ value = (String) ExpressionEvaluatorManager.evaluate(
+ "value", value_, String.class, this, pageContext);
+ }
+
+ // 'type' attribute
+ if (type_ != null) {
+ type = (String) ExpressionEvaluatorManager.evaluate(
+ "type", type_, String.class, this, pageContext);
+ }
+
+ // 'dateStyle' attribute
+ if (dateStyle_ != null) {
+ dateStyle = (String) ExpressionEvaluatorManager.evaluate(
+ "dateStyle", dateStyle_, String.class, this, pageContext);
+ }
+
+ // 'timeStyle' attribute
+ if (timeStyle_ != null) {
+ timeStyle = (String) ExpressionEvaluatorManager.evaluate(
+ "timeStyle", timeStyle_, String.class, this, pageContext);
+ }
+
+ // 'pattern' attribute
+ if (pattern_ != null) {
+ pattern = (String) ExpressionEvaluatorManager.evaluate(
+ "pattern", pattern_, String.class, this, pageContext);
+ }
+
+ // 'timeZone' attribute
+ if (timeZone_ != null) {
+ timeZone = ExpressionEvaluatorManager.evaluate(
+ "timeZone", timeZone_, Object.class, this, pageContext);
+ }
+
+ // 'parseLocale' attribute
+ if (parseLocale_ != null) {
+ Object obj = ExpressionEvaluatorManager.evaluate(
+ "parseLocale", parseLocale_, Object.class, this, pageContext);
+ if (obj != null) {
+ if (obj instanceof Locale) {
+ parseLocale = (Locale) obj;
+ } else {
+ String localeStr = (String) obj;
+ if (!"".equals(localeStr)) {
+ parseLocale = SetLocaleSupport.parseLocale(localeStr);
+ }
+ }
+ }
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseNumberTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseNumberTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseNumberTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/ParseNumberTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -39,9 +39,9 @@ public class ParseNumberTag extends Pars
private String value_; // stores EL-based property
private String type_; // stores EL-based property
- private String pattern_; // stores EL-based property
- private String parseLocale_; // stores EL-based property
- private String integerOnly_; // stores EL-based property
+ private String pattern_; // stores EL-based property
+ private String parseLocale_; // stores EL-based property
+ private String integerOnly_; // stores EL-based property
//*********************************************************************
@@ -62,16 +62,18 @@ public class ParseNumberTag extends Pars
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -82,30 +84,35 @@ public class ParseNumberTag extends Pars
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
- this.valueSpecified = true;
+ this.valueSpecified = true;
}
// for EL-based attribute
+
public void setType(String type_) {
this.type_ = type_;
}
// for EL-based attribute
+
public void setPattern(String pattern_) {
this.pattern_ = pattern_;
}
// for EL-based attribute
+
public void setParseLocale(String parseLocale_) {
this.parseLocale_ = parseLocale_;
}
// for EL-based attribute
+
public void setIntegerOnly(String integerOnly_) {
this.integerOnly_ = integerOnly_;
- this.integerOnlySpecified = true;
+ this.integerOnlySpecified = true;
}
@@ -113,14 +120,16 @@ public class ParseNumberTag extends Pars
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = type_ = pattern_ = parseLocale_ = integerOnly_ = null;
+ value_ = type_ = pattern_ = parseLocale_ = integerOnly_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
- Object obj = null;
+ Object obj = null;
/*
* Note: we don't check for type mismatches here; we assume
@@ -130,48 +139,48 @@ public class ParseNumberTag extends Pars
* propagate up.
*/
- // 'value' attribute
- if (value_ != null) {
- value = (String) ExpressionEvaluatorManager.evaluate(
- "value", value_, String.class, this, pageContext);
- }
-
- // 'type' attribute
- if (type_ != null) {
- type = (String) ExpressionEvaluatorManager.evaluate(
- "type", type_, String.class, this, pageContext);
- }
-
- // 'pattern' attribute
- if (pattern_ != null) {
- pattern = (String) ExpressionEvaluatorManager.evaluate(
- "pattern", pattern_, String.class, this, pageContext);
- }
-
- // 'parseLocale' attribute
- if (parseLocale_ != null) {
- obj = ExpressionEvaluatorManager.evaluate(
- "parseLocale", parseLocale_, Object.class, this, pageContext);
- if (obj != null) {
- if (obj instanceof Locale) {
- parseLocale = (Locale) obj;
- } else {
- String localeStr = (String) obj;
- if (!"".equals(localeStr)) {
- parseLocale = SetLocaleSupport.parseLocale(localeStr);
- }
- }
- }
- }
-
- // 'integerOnly' attribute
- if (integerOnly_ != null) {
- obj = ExpressionEvaluatorManager.evaluate(
- "integerOnly", integerOnly_, Boolean.class, this, pageContext);
- if (obj != null) {
- isIntegerOnly = ((Boolean) obj).booleanValue();
- }
- }
+ // 'value' attribute
+ if (value_ != null) {
+ value = (String) ExpressionEvaluatorManager.evaluate(
+ "value", value_, String.class, this, pageContext);
+ }
+
+ // 'type' attribute
+ if (type_ != null) {
+ type = (String) ExpressionEvaluatorManager.evaluate(
+ "type", type_, String.class, this, pageContext);
+ }
+
+ // 'pattern' attribute
+ if (pattern_ != null) {
+ pattern = (String) ExpressionEvaluatorManager.evaluate(
+ "pattern", pattern_, String.class, this, pageContext);
+ }
+
+ // 'parseLocale' attribute
+ if (parseLocale_ != null) {
+ obj = ExpressionEvaluatorManager.evaluate(
+ "parseLocale", parseLocale_, Object.class, this, pageContext);
+ if (obj != null) {
+ if (obj instanceof Locale) {
+ parseLocale = (Locale) obj;
+ } else {
+ String localeStr = (String) obj;
+ if (!"".equals(localeStr)) {
+ parseLocale = SetLocaleSupport.parseLocale(localeStr);
+ }
+ }
+ }
+ }
+
+ // 'integerOnly' attribute
+ if (integerOnly_ != null) {
+ obj = ExpressionEvaluatorManager.evaluate(
+ "integerOnly", integerOnly_, Boolean.class, this, pageContext);
+ if (obj != null) {
+ isIntegerOnly = ((Boolean) obj).booleanValue();
+ }
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/RequestEncodingTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/RequestEncodingTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/RequestEncodingTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/RequestEncodingTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -55,16 +55,18 @@ public class RequestEncodingTag extends
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -75,6 +77,7 @@ public class RequestEncodingTag extends
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
}
@@ -84,12 +87,14 @@ public class RequestEncodingTag extends
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = null;
+ value_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -99,9 +104,9 @@ public class RequestEncodingTag extends
* propagate up.
*/
- if (value_ != null) {
- value = (String) ExpressionEvaluatorManager.evaluate(
- "value", value_, String.class, this, pageContext);
- }
+ if (value_ != null) {
+ value = (String) ExpressionEvaluatorManager.evaluate(
+ "value", value_, String.class, this, pageContext);
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetBundleTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetBundleTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetBundleTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetBundleTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -56,16 +56,18 @@ public class SetBundleTag extends SetBun
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -76,6 +78,7 @@ public class SetBundleTag extends SetBun
// Accessor methods
// for EL-based attribute
+
public void setBasename(String basename_) {
this.basename_ = basename_;
}
@@ -85,16 +88,18 @@ public class SetBundleTag extends SetBun
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- basename_ = null;
+ basename_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
- // 'basename' attribute (mandatory)
- basename = (String) ExpressionEvaluatorManager.evaluate(
- "basename", basename_, String.class, this, pageContext);
+ // 'basename' attribute (mandatory)
+ basename = (String) ExpressionEvaluatorManager.evaluate(
+ "basename", basename_, String.class, this, pageContext);
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetLocaleTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetLocaleTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetLocaleTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetLocaleTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -56,16 +56,18 @@ public class SetLocaleTag extends SetLoc
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -76,11 +78,13 @@ public class SetLocaleTag extends SetLoc
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
}
// for EL-based attribute
+
public void setVariant(String variant_) {
this.variant_ = variant_;
}
@@ -90,22 +94,24 @@ public class SetLocaleTag extends SetLoc
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = variant_ = null;
+ value_ = variant_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
- // 'value' attribute (mandatory)
- value = ExpressionEvaluatorManager.evaluate(
- "value", value_, Object.class, this, pageContext);
-
- // 'variant' attribute (optional)
- if (variant_ != null) {
- variant = (String) ExpressionEvaluatorManager.evaluate(
- "variant", variant_, String.class, this, pageContext);
- }
+ // 'value' attribute (mandatory)
+ value = ExpressionEvaluatorManager.evaluate(
+ "value", value_, Object.class, this, pageContext);
+
+ // 'variant' attribute (optional)
+ if (variant_ != null) {
+ variant = (String) ExpressionEvaluatorManager.evaluate(
+ "variant", variant_, String.class, this, pageContext);
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetTimeZoneTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetTimeZoneTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetTimeZoneTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/SetTimeZoneTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -56,16 +56,18 @@ public class SetTimeZoneTag extends SetT
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -76,6 +78,7 @@ public class SetTimeZoneTag extends SetT
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
}
@@ -85,16 +88,18 @@ public class SetTimeZoneTag extends SetT
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = null;
+ value_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
-
- // 'value' attribute (mandatory)
- value = ExpressionEvaluatorManager.evaluate(
- "value", value_, Object.class, this, pageContext);
+
+ // 'value' attribute (mandatory)
+ value = ExpressionEvaluatorManager.evaluate(
+ "value", value_, Object.class, this, pageContext);
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/TimeZoneTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/TimeZoneTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/TimeZoneTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/fmt/TimeZoneTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.fmt;
@@ -56,16 +56,18 @@ public class TimeZoneTag extends TimeZon
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -76,6 +78,7 @@ public class TimeZoneTag extends TimeZon
// Accessor methods
// for EL-based attribute
+
public void setValue(String value_) {
this.value_ = value_;
}
@@ -85,16 +88,18 @@ public class TimeZoneTag extends TimeZon
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- value_ = null;
+ value_ = null;
}
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
- // 'value' attribute (mandatory)
- value = ExpressionEvaluatorManager.evaluate(
- "value", value_, Object.class, this, pageContext);
+ // 'value' attribute (mandatory)
+ value = ExpressionEvaluatorManager.evaluate(
+ "value", value_, Object.class, this, pageContext);
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/DateParamTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/DateParamTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/DateParamTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/DateParamTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.sql;
import java.util.Date;
@@ -29,36 +29,37 @@ import org.apache.taglibs.standard.tag.c
* @author Justyna Horwat
*/
public class DateParamTag extends DateParamTagSupport {
-
+
private String valueEL;
private String typeEL;
public void setValue(String valueEL) {
- this.valueEL = valueEL;
+ this.valueEL = valueEL;
}
public void setType(String typeEL) {
- this.typeEL = typeEL;
+ this.typeEL = typeEL;
}
public int doStartTag() throws JspException {
evaluateExpressions();
- return super.doStartTag();
+ return super.doStartTag();
}
//*********************************************************************
// Private utility methods
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
- if (valueEL != null) {
- value = (Date) ExpressionEvaluatorManager.evaluate(
- "value", valueEL, Date.class, this, pageContext);
- }
-
- if (typeEL != null) {
- type = (String) ExpressionEvaluatorManager.evaluate(
- "type", typeEL, String.class, this, pageContext);
+ if (valueEL != null) {
+ value = (Date) ExpressionEvaluatorManager.evaluate(
+ "value", valueEL, Date.class, this, pageContext);
+ }
+
+ if (typeEL != null) {
+ type = (String) ExpressionEvaluatorManager.evaluate(
+ "type", typeEL, String.class, this, pageContext);
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/ParamTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/ParamTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/ParamTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/ParamTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.sql;
import javax.servlet.jsp.JspException;
@@ -27,19 +27,19 @@ import org.apache.taglibs.standard.tag.c
* @author Hans Bergsten
*/
public class ParamTag extends ParamTagSupport {
-
+
private String valueEL;
public void setValue(String valueEL) {
- this.valueEL = valueEL;
+ this.valueEL = valueEL;
}
public int doStartTag() throws JspException {
- if (valueEL != null) {
- value = (Object)
- ExpressionEvaluatorManager.evaluate("value", valueEL,
- Object.class, this, pageContext);
- }
- return super.doStartTag();
+ if (valueEL != null) {
+ value = (Object)
+ ExpressionEvaluatorManager.evaluate("value", valueEL,
+ Object.class, this, pageContext);
+ }
+ return super.doStartTag();
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/QueryTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/QueryTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/QueryTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/QueryTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.sql;
import javax.servlet.jsp.JspException;
@@ -50,8 +50,8 @@ public class QueryTag extends QueryTagSu
// Accessor methods
public void setDataSource(String dataSourceEL) {
- this.dataSourceEL = dataSourceEL;
- this.dataSourceSpecified = true;
+ this.dataSourceEL = dataSourceEL;
+ this.dataSourceSpecified = true;
}
/**
@@ -59,7 +59,7 @@ public class QueryTag extends QueryTagSu
* specified using startRow.
*/
public void setStartRow(String startRowEL) {
- this.startRowEL = startRowEL;
+ this.startRowEL = startRowEL;
}
/**
@@ -67,8 +67,8 @@ public class QueryTag extends QueryTagSu
* the maximum number of rows returned.
*/
public void setMaxRows(String maxRowsEL) {
- this.maxRowsEL = maxRowsEL;
- this.maxRowsSpecified = true;
+ this.maxRowsEL = maxRowsEL;
+ this.maxRowsSpecified = true;
}
/**
@@ -78,43 +78,46 @@ public class QueryTag extends QueryTagSu
* be set using nested value elements.
*/
public void setSql(String sqlEL) {
- this.sqlEL = sqlEL;
+ this.sqlEL = sqlEL;
}
public int doStartTag() throws JspException {
evaluateExpressions();
- return super.doStartTag();
+ return super.doStartTag();
}
//*********************************************************************
// Private utility methods
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
Integer tempInt = null;
if (dataSourceEL != null) {
rawDataSource = (Object) ExpressionEvaluatorManager.evaluate(
- "dataSource", dataSourceEL, Object.class, this, pageContext);
+ "dataSource", dataSourceEL, Object.class, this, pageContext);
}
if (sqlEL != null) {
sql = (String) ExpressionEvaluatorManager.evaluate("sql", sqlEL,
- String.class, this, pageContext);
+ String.class, this, pageContext);
}
- if (startRowEL != null) {
- tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
- "startRow", startRowEL, Integer.class, this, pageContext);
- if (tempInt != null)
- startRow = tempInt.intValue();
- }
-
- if (maxRowsEL != null) {
- tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
- "maxRows", maxRowsEL, Integer.class, this, pageContext);
- if (tempInt != null)
- maxRows = tempInt.intValue();
- }
+ if (startRowEL != null) {
+ tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
+ "startRow", startRowEL, Integer.class, this, pageContext);
+ if (tempInt != null) {
+ startRow = tempInt.intValue();
+ }
+ }
+
+ if (maxRowsEL != null) {
+ tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
+ "maxRows", maxRowsEL, Integer.class, this, pageContext);
+ if (tempInt != null) {
+ maxRows = tempInt.intValue();
+ }
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/SetDataSourceTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/SetDataSourceTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/SetDataSourceTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/SetDataSourceTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.sql;
@@ -25,7 +25,6 @@ import org.apache.taglibs.standard.tag.c
/**
* <p>Tag handler for <SetDataSource> in JSTL, used to create
* a simple DataSource for prototyping.</p>
- *
*/
public class SetDataSourceTag extends SetDataSourceTagSupport {
@@ -39,24 +38,24 @@ public class SetDataSourceTag extends Se
// Accessor methods
public void setDataSource(String dataSourceEL) {
- this.dataSourceEL = dataSourceEL;
- this.dataSourceSpecified = true;
+ this.dataSourceEL = dataSourceEL;
+ this.dataSourceSpecified = true;
}
public void setDriver(String driverClassNameEL) {
- this.driverClassNameEL = driverClassNameEL;
+ this.driverClassNameEL = driverClassNameEL;
}
public void setUrl(String jdbcURLEL) {
- this.jdbcURLEL = jdbcURLEL;
+ this.jdbcURLEL = jdbcURLEL;
}
public void setUser(String userNameEL) {
- this.userNameEL = userNameEL;
+ this.userNameEL = userNameEL;
}
public void setPassword(String passwordEL) {
- this.passwordEL = passwordEL;
+ this.passwordEL = passwordEL;
}
//*********************************************************************
@@ -73,30 +72,31 @@ public class SetDataSourceTag extends Se
// Private utility methods
// Evaluates expressions as necessary
+
private void evaluateExpressions() throws JspException {
if (dataSourceEL != null) {
- dataSource = ExpressionEvaluatorManager.evaluate
- ("dataSource", dataSourceEL, Object.class, this, pageContext);
+ dataSource = ExpressionEvaluatorManager.evaluate
+ ("dataSource", dataSourceEL, Object.class, this, pageContext);
}
if (driverClassNameEL != null) {
- driverClassName = (String) ExpressionEvaluatorManager.evaluate
- ("driver", driverClassNameEL, String.class, this, pageContext);
+ driverClassName = (String) ExpressionEvaluatorManager.evaluate
+ ("driver", driverClassNameEL, String.class, this, pageContext);
}
if (jdbcURLEL != null) {
- jdbcURL = (String) ExpressionEvaluatorManager.evaluate
- ("url", jdbcURLEL, String.class, this, pageContext);
+ jdbcURL = (String) ExpressionEvaluatorManager.evaluate
+ ("url", jdbcURLEL, String.class, this, pageContext);
}
if (userNameEL != null) {
- userName = (String) ExpressionEvaluatorManager.evaluate
- ("user", userNameEL, String.class, this, pageContext);
+ userName = (String) ExpressionEvaluatorManager.evaluate
+ ("user", userNameEL, String.class, this, pageContext);
}
if (passwordEL != null) {
- password = (String) ExpressionEvaluatorManager.evaluate
- ("password", passwordEL, String.class, this, pageContext);
+ password = (String) ExpressionEvaluatorManager.evaluate
+ ("password", passwordEL, String.class, this, pageContext);
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/TransactionTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/TransactionTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/TransactionTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/TransactionTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.sql;
import javax.servlet.jsp.JspException;
@@ -28,33 +28,33 @@ import org.apache.taglibs.standard.tag.c
* @author Justyna Horwat
*/
public class TransactionTag extends TransactionTagSupport {
-
+
private String dataSourceEL;
private String isolationEL;
public void setDataSource(String dataSourceEL) {
- this.dataSourceEL = dataSourceEL;
- this.dataSourceSpecified = true;
+ this.dataSourceEL = dataSourceEL;
+ this.dataSourceSpecified = true;
}
public void setIsolation(String isolationEL) {
- this.isolationEL = isolationEL;
+ this.isolationEL = isolationEL;
}
public int doStartTag() throws JspException {
- if (dataSourceEL != null) {
- rawDataSource = (Object)
- ExpressionEvaluatorManager.evaluate("dataSource",
- dataSourceEL, Object.class, this, pageContext);
- }
-
- if (isolationEL != null) {
- isolationEL = (String)
- ExpressionEvaluatorManager.evaluate("isolation",
- isolationEL, String.class, this, pageContext);
+ if (dataSourceEL != null) {
+ rawDataSource = (Object)
+ ExpressionEvaluatorManager.evaluate("dataSource",
+ dataSourceEL, Object.class, this, pageContext);
+ }
+
+ if (isolationEL != null) {
+ isolationEL = (String)
+ ExpressionEvaluatorManager.evaluate("isolation",
+ isolationEL, String.class, this, pageContext);
super.setIsolation(isolationEL);
- }
+ }
- return super.doStartTag();
+ return super.doStartTag();
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/UpdateTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/UpdateTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/UpdateTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/sql/UpdateTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.sql;
import javax.servlet.jsp.JspException;
@@ -27,13 +27,13 @@ import org.apache.taglibs.standard.tag.c
* @author Hans Bergsten
*/
public class UpdateTag extends UpdateTagSupport {
-
+
private String dataSourceEL;
private String sqlEL;
public void setDataSource(String dataSourceEL) {
- this.dataSourceEL = dataSourceEL;
- this.dataSourceSpecified = true;
+ this.dataSourceEL = dataSourceEL;
+ this.dataSourceSpecified = true;
}
/**
@@ -43,19 +43,19 @@ public class UpdateTag extends UpdateTag
* be set using nested value elements.
*/
public void setSql(String sqlEL) {
- this.sqlEL = sqlEL;
+ this.sqlEL = sqlEL;
}
public int doStartTag() throws JspException {
- if (dataSourceEL != null) {
- rawDataSource = (Object)
- ExpressionEvaluatorManager.evaluate("dataSource",
- dataSourceEL, Object.class, this, pageContext);
- }
- if (sqlEL != null) {
- sql = (String) ExpressionEvaluatorManager.evaluate("sql", sqlEL,
- String.class, this, pageContext);
- }
- return super.doStartTag();
+ if (dataSourceEL != null) {
+ rawDataSource = (Object)
+ ExpressionEvaluatorManager.evaluate("dataSource",
+ dataSourceEL, Object.class, this, pageContext);
+ }
+ if (sqlEL != null) {
+ sql = (String) ExpressionEvaluatorManager.evaluate("sql", sqlEL,
+ String.class, this, pageContext);
+ }
+ return super.doStartTag();
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ExprTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ExprTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ExprTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ExprTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.xml;
@@ -54,17 +54,19 @@ public class ExprTag extends ExprSupport
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -75,6 +77,7 @@ public class ExprTag extends ExprSupport
// Accessor methods
// for EL-based attribute
+
public void setEscapeXml(String escapeXml_) {
this.escapeXml_ = escapeXml_;
}
@@ -84,12 +87,14 @@ public class ExprTag extends ExprSupport
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- escapeXml_ = null;
+ escapeXml_ = null;
}
/* Evaluates expressions as necessary */
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -101,16 +106,17 @@ public class ExprTag extends ExprSupport
if (escapeXml_ != null) {
Boolean b = (Boolean) ExpressionUtil.evalNotNull(
- "out",
- "escapeXml",
- escapeXml_,
- Boolean.class,
- this,
- pageContext);
- if (b == null)
+ "out",
+ "escapeXml",
+ escapeXml_,
+ Boolean.class,
+ this,
+ pageContext);
+ if (b == null) {
escapeXml = false;
- else
+ } else {
escapeXml = b.booleanValue();
+ }
}
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParamTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParamTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParamTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParamTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.xml;
@@ -35,7 +35,7 @@ public class ParamTag extends ParamSuppo
// 'Private' state (implementation details)
private String name_; // stores EL-based property
- private String value_; // stores EL-based property
+ private String value_; // stores EL-based property
//*********************************************************************
@@ -51,17 +51,19 @@ public class ParamTag extends ParamSuppo
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -72,6 +74,7 @@ public class ParamTag extends ParamSuppo
// Accessor methods
// for EL-based attribute
+
public void setName(String name_) {
this.name_ = name_;
}
@@ -85,12 +88,14 @@ public class ParamTag extends ParamSuppo
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- name_ = value_ = null;
+ name_ = value_ = null;
}
/* Evaluates expressions as necessary */
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -100,9 +105,9 @@ public class ParamTag extends ParamSuppo
* propagate up.
*/
- name = (String) ExpressionUtil.evalNotNull(
- "param", "name", name_, String.class, this, pageContext);
- value = ExpressionUtil.evalNotNull(
- "param", "value", value_, Object.class, this, pageContext);
+ name = (String) ExpressionUtil.evalNotNull(
+ "param", "name", name_, String.class, this, pageContext);
+ value = ExpressionUtil.evalNotNull(
+ "param", "value", value_, Object.class, this, pageContext);
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParseTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParseTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParseTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/ParseTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.xml;
@@ -36,8 +36,8 @@ public class ParseTag extends ParseSuppo
// 'Private' state (implementation details)
private String xml_; // stores EL-based property
- private String systemId_; // stores EL-based property
- private String filter_; // stores EL-based property
+ private String systemId_; // stores EL-based property
+ private String filter_; // stores EL-based property
//*********************************************************************
@@ -58,17 +58,19 @@ public class ParseTag extends ParseSuppo
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -79,6 +81,7 @@ public class ParseTag extends ParseSuppo
// Accessor methods
// for EL-based attribute
+
public void setFilter(String filter_) {
this.filter_ = filter_;
}
@@ -96,12 +99,14 @@ public class ParseTag extends ParseSuppo
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- filter_ = xml_ = systemId_ = null;
+ filter_ = xml_ = systemId_ = null;
}
/* Evaluates expressions as necessary */
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -111,17 +116,17 @@ public class ParseTag extends ParseSuppo
* propagate up.
*/
- xml = ExpressionUtil.evalNotNull(
- "parse", "xml", xml_, Object.class, this, pageContext);
- systemId = (String) ExpressionUtil.evalNotNull(
- "parse", "systemId", systemId_, String.class, this, pageContext);
-
- try {
- filter = (XMLFilter) ExpressionUtil.evalNotNull(
- "parse", "filter", filter_, XMLFilter.class, this, pageContext);
- } catch (NullAttributeException ex) {
- // explicitly let 'filter' be null
- filter = null;
- }
+ xml = ExpressionUtil.evalNotNull(
+ "parse", "xml", xml_, Object.class, this, pageContext);
+ systemId = (String) ExpressionUtil.evalNotNull(
+ "parse", "systemId", systemId_, String.class, this, pageContext);
+
+ try {
+ filter = (XMLFilter) ExpressionUtil.evalNotNull(
+ "parse", "filter", filter_, XMLFilter.class, this, pageContext);
+ } catch (NullAttributeException ex) {
+ // explicitly let 'filter' be null
+ filter = null;
+ }
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/TransformTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/TransformTag.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/TransformTag.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/xml/TransformTag.java Sat Nov 20 18:14:00 2010
@@ -13,7 +13,7 @@
* 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.taglibs.standard.tag.el.xml;
@@ -36,9 +36,9 @@ public class TransformTag extends Transf
private String xml_; // stores EL-based property
private String xmlSystemId_; // stores EL-based property
- private String xslt_; // stores EL-based property
- private String xsltSystemId_; // stores EL-based property
- private String result_; // stores EL-based property
+ private String xslt_; // stores EL-based property
+ private String xsltSystemId_; // stores EL-based property
+ private String result_; // stores EL-based property
//*********************************************************************
@@ -54,17 +54,19 @@ public class TransformTag extends Transf
// Tag logic
// evaluates expression and chains to parent
+
public int doStartTag() throws JspException {
// evaluate any expressions we were passed, once per invocation
evaluateExpressions();
- // chain to the parent implementation
- return super.doStartTag();
+ // chain to the parent implementation
+ return super.doStartTag();
}
// Releases any resources we may have (or inherit)
+
public void release() {
super.release();
init();
@@ -75,22 +77,26 @@ public class TransformTag extends Transf
// Accessor methods
// for EL-based attribute
+
public void setXml(String xml_) {
this.xml_ = xml_;
this.xmlSpecified = true;
}
// for EL-based attribute
+
public void setXmlSystemId(String xmlSystemId_) {
this.xmlSystemId_ = xmlSystemId_;
}
// for EL-based attribute
+
public void setXslt(String xslt_) {
this.xslt_ = xslt_;
}
// for EL-based attribute
+
public void setXsltSystemId(String xsltSystemId_) {
this.xsltSystemId_ = xsltSystemId_;
}
@@ -103,6 +109,7 @@ public class TransformTag extends Transf
*/
// for EL-based attribute
+
public void setResult(String result_) {
this.result_ = result_;
}
@@ -112,12 +119,14 @@ public class TransformTag extends Transf
// Private (utility) methods
// (re)initializes state (during release() or construction)
+
private void init() {
// null implies "no expression"
- xml_ = xmlSystemId = xslt_ = xsltSystemId_ = result_ = null;
+ xml_ = xmlSystemId = xslt_ = xsltSystemId_ = result_ = null;
}
/* Evaluates expressions as necessary */
+
private void evaluateExpressions() throws JspException {
/*
* Note: we don't check for type mismatches here; we assume
@@ -127,19 +136,19 @@ public class TransformTag extends Transf
* propagate up.
*/
- xml = ExpressionUtil.evalNotNull(
- "transform", "xml", xml_, Object.class, this, pageContext);
- xmlSystemId = (String) ExpressionUtil.evalNotNull(
- "transform", "xmlSystemId", xmlSystemId_, String.class,
- this, pageContext);
- xslt= ExpressionUtil.evalNotNull(
- "transform", "xslt", xslt_, Object.class, this,
- pageContext);
- xsltSystemId = (String) ExpressionUtil.evalNotNull(
- "transform", "xsltSystemId", xsltSystemId_, String.class,
- this, pageContext);
- result = (Result) ExpressionUtil.evalNotNull(
- "transform", "result", result_, Result.class, this, pageContext);
+ xml = ExpressionUtil.evalNotNull(
+ "transform", "xml", xml_, Object.class, this, pageContext);
+ xmlSystemId = (String) ExpressionUtil.evalNotNull(
+ "transform", "xmlSystemId", xmlSystemId_, String.class,
+ this, pageContext);
+ xslt = ExpressionUtil.evalNotNull(
+ "transform", "xslt", xslt_, Object.class, this,
+ pageContext);
+ xsltSystemId = (String) ExpressionUtil.evalNotNull(
+ "transform", "xsltSystemId", xsltSystemId_, String.class,
+ this, pageContext);
+ result = (Result) ExpressionUtil.evalNotNull(
+ "transform", "result", result_, Result.class, this, pageContext);
}
}
Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tlv/ValidationUtil.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tlv/ValidationUtil.java?rev=1037284&r1=1037283&r2=1037284&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tlv/ValidationUtil.java (original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tlv/ValidationUtil.java Sat Nov 20 18:14:00 2010
@@ -25,24 +25,25 @@ import org.apache.taglibs.standard.lang.
*/
public class ValidationUtil {
static String validateExpression(
- String elem, String att, String expr) {
+ String elem, String att, String expr) {
- // let's just use the cache kept by the ExpressionEvaluatorManager
- ExpressionEvaluator current;
- try {
- current =
- ExpressionEvaluatorManager.getEvaluatorByName(
- ExpressionEvaluatorManager.EVALUATOR_CLASS);
- } catch (JspException ex) {
- // (using JspException here feels ugly, but it's what EEM uses)
- return ex.getMessage();
- }
+ // let's just use the cache kept by the ExpressionEvaluatorManager
+ ExpressionEvaluator current;
+ try {
+ current =
+ ExpressionEvaluatorManager.getEvaluatorByName(
+ ExpressionEvaluatorManager.EVALUATOR_CLASS);
+ } catch (JspException ex) {
+ // (using JspException here feels ugly, but it's what EEM uses)
+ return ex.getMessage();
+ }
- String response = current.validate(att, expr);
- if (response == null)
- return response;
- else
- return "tag = '" + elem + "' / attribute = '" + att + "': "
- + response;
+ String response = current.validate(att, expr);
+ if (response == null) {
+ return response;
+ } else {
+ return "tag = '" + elem + "' / attribute = '" + att + "': "
+ + response;
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org