dmkarr 2002/10/13 20:18:39 Modified: contrib/struts-el/src/share/org/apache/strutsel/taglib/html ELRadioTag.java ELPasswordTag.java ELOptionTag.java ELOptionsTag.java ELOptionsCollectionTag.java ELMultiboxTag.java ELLinkTag.java ELImageTag.java ELHtmlTag.java ELHiddenTag.java ELFrameTag.java ELFileTag.java ELCheckboxTag.java ELButtonTag.java ELCancelTag.java Log: Changed to reflect mapings for boolean attributes Revision Changes Path 1.6 +55 -10 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELRadioTag.java Index: ELRadioTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELRadioTag.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ELRadioTag.java 5 Oct 2002 05:38:40 -0000 1.5 +++ ELRadioTag.java 14 Oct 2002 03:18:38 -0000 1.6 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.RadioTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,48 @@ public class ELRadioTag extends RadioTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELButtonTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELButtonTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + setIndexedExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +133,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +142,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +151,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("radio", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("radio", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -139,7 +184,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -153,7 +198,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +89 -12 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELPasswordTag.java Index: ELPasswordTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELPasswordTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELPasswordTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELPasswordTag.java 14 Oct 2002 03:18:38 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.PasswordTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,80 @@ public class ELPasswordTag extends PasswordTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + /** + * String value of the "readonly" attribute. + */ + private String readonlyExpr; + /** + * String value of the "redisplay" attribute. + */ + private String redisplayExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + /** + * Returns the string value of the "readonly" attribute. + */ + public String getReadonlyExpr() { return (readonlyExpr); } + /** + * Returns the string value of the "redisplay" attribute. + */ + public String getRedisplayExpr() { return (redisplayExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELPasswordTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELPasswordTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Sets the string value of the "readonly" attribute. This attribute is + * mapped to this method by the <code>ELPasswordTagBeanInfo</code> class. + */ + public void setReadonlyExpr(String readonlyExpr) + { this.readonlyExpr = readonlyExpr; } + + /** + * Sets the string value of the "redisplay" attribute. This attribute is + * mapped to this method by the <code>ELPasswordTagBeanInfo</code> class. + */ + public void setRedisplayExpr(String redisplayExpr) + { this.redisplayExpr = redisplayExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + setIndexedExpr(null); + setReadonlyExpr(null); + setRedisplayExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +165,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +174,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +183,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("password", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("password", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -139,7 +216,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -147,7 +224,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -265,7 +342,7 @@ } try { - setReadonly(((Boolean) evalAttr("readonly", getReadonly()+"", + setReadonly(((Boolean) evalAttr("readonly", getReadonlyExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -273,7 +350,7 @@ } try { - setRedisplay(((Boolean) evalAttr("redisplay", getRedisplay() + "", + setRedisplay(((Boolean) evalAttr("redisplay", getRedisplayExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.5 +38 -9 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELOptionTag.java Index: ELOptionTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELOptionTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ELOptionTag.java 4 Oct 2002 05:34:19 -0000 1.4 +++ ELOptionTag.java 14 Oct 2002 03:18:38 -0000 1.5 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.OptionTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -82,6 +82,32 @@ public class ELOptionTag extends OptionTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELOptionTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -93,7 +119,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -101,6 +128,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -108,8 +137,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("option", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("option", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -128,7 +157,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.5 +39 -9 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELOptionsTag.java Index: ELOptionsTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELOptionsTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ELOptionsTag.java 3 Oct 2002 05:02:04 -0000 1.4 +++ ELOptionsTag.java 14 Oct 2002 03:18:38 -0000 1.5 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.OptionsTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -85,6 +85,33 @@ public class ELOptionsTag extends OptionsTag { /** + * String value of the "filter" attribute. + */ + private String filterExpr; + + /** + * Returns the string value of the "filter" attribute. + */ + public String getFilterExpr() { return (filterExpr); } + + /** + * Sets the string value of the "filter" attribute. This attribute is + * mapped to this method by the <code>ELOptionsCollectionTagBeanInfo</code> + * class. + */ + public void setFilterExpr(String filterExpr) + { this.filterExpr = filterExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setFilterExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -96,7 +123,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -104,6 +132,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -111,8 +141,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("options", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("options", attrName, attrValue, + attrType, this, pageContext)); } /** @@ -132,7 +162,7 @@ } try { - setFilter(((Boolean) evalAttr("filter", getFilter() + "", + setFilter(((Boolean) evalAttr("filter", getFilterExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.5 +39 -10 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELOptionsCollectionTag.java Index: ELOptionsCollectionTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELOptionsCollectionTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ELOptionsCollectionTag.java 3 Oct 2002 05:02:32 -0000 1.4 +++ ELOptionsCollectionTag.java 14 Oct 2002 03:18:38 -0000 1.5 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.OptionsCollectionTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -89,6 +89,33 @@ public class ELOptionsCollectionTag extends OptionsCollectionTag { /** + * String value of the "filter" attribute. + */ + private String filterExpr; + + /** + * Returns the string value of the "filter" attribute. + */ + public String getFilterExpr() { return (filterExpr); } + + /** + * Sets the string value of the "filter" attribute. This attribute is + * mapped to this method by the <code>ELOptionsCollectionTagBeanInfo</code> + * class. + */ + public void setFilterExpr(String filterExpr) + { this.filterExpr = filterExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setFilterExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -100,7 +127,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -108,6 +136,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -115,9 +145,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("optionsCollection", attrName, - attrValue, attrType, - this, pageContext)); + return (EvalHelper.eval("optionsCollection", attrName, attrValue, + attrType, this, pageContext)); } /** @@ -130,7 +159,7 @@ */ private void evaluateExpressions() throws JspException { try { - setFilter(((Boolean) evalAttr("filter", getFilter() + "", + setFilter(((Boolean) evalAttr("filter", getFilterExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +38 -9 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELMultiboxTag.java Index: ELMultiboxTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELMultiboxTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELMultiboxTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELMultiboxTag.java 14 Oct 2002 03:18:38 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.MultiboxTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -84,6 +84,32 @@ public class ELMultiboxTag extends MultiboxTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELMultiboxTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -95,7 +121,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -103,6 +130,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -110,8 +139,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("multibox", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("multibox", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -143,7 +172,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.5 +55 -10 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELLinkTag.java Index: ELLinkTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELLinkTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ELLinkTag.java 3 Oct 2002 05:03:44 -0000 1.4 +++ ELLinkTag.java 14 Oct 2002 03:18:38 -0000 1.5 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.LinkTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,48 @@ public class ELLinkTag extends LinkTag { /** + * String value of the "transaction" attribute. + */ + private String transactionExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + + /** + * Returns the string value of the "transaction" attribute. + */ + public String getTransactionExpr() { return (transactionExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + + /** + * Sets the string value of the "transaction" attribute. This attribute is + * mapped to this method by the <code>ELLinkTagBeanInfo</code> class. + */ + public void setTransactionExpr(String transactionExpr) + { this.transactionExpr = transactionExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELButtonTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setTransactionExpr(null); + setIndexedExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +133,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +142,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +151,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("link", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("link", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -146,7 +191,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -359,7 +404,7 @@ try { setTransaction(((Boolean) evalAttr("transaction", - getTransaction() + "", + getTransactionExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +55 -10 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELImageTag.java Index: ELImageTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELImageTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELImageTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELImageTag.java 14 Oct 2002 03:18:38 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.ImageTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,48 @@ public class ELImageTag extends ImageTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELImageTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELImageTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + setIndexedExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +133,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +142,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +151,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("image", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("image", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -157,7 +202,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -165,7 +210,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +56 -11 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELHtmlTag.java Index: ELHtmlTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELHtmlTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELHtmlTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELHtmlTag.java 14 Oct 2002 03:18:38 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.HtmlTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -81,6 +81,48 @@ public class ELHtmlTag extends HtmlTag { /** + * String value of the "locale" attribute. + */ + private String localeExpr; + /** + * String value of the "xhtml" attribute. + */ + private String xhtmlExpr; + + /** + * Returns the string value of the "locale" attribute. + */ + public String getLocaleExpr() { return (localeExpr); } + /** + * Returns the string value of the "xhtml" attribute. + */ + public String getXhtmlExpr() { return (xhtmlExpr); } + + /** + * Sets the string value of the "locale" attribute. This attribute is + * mapped to this method by the <code>ELHtmlTagBeanInfo</code> class. + */ + public void setLocaleExpr(String localeExpr) + { this.localeExpr = localeExpr; } + + /** + * Sets the string value of the "xhtml" attribute. This attribute is + * mapped to this method by the <code>ELHtmlTagBeanInfo</code> class. + */ + public void setXhtmlExpr(String xhtmlExpr) + { this.xhtmlExpr = xhtmlExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setLocaleExpr(null); + setXhtmlExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -92,7 +134,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -100,6 +143,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -107,10 +152,10 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("html", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("html", attrName, attrValue, attrType, + this, pageContext)); } - + /** * Processes all attribute values which use the JSTL expression evaluation * engine to determine their values. If any evaluation fails with a @@ -121,7 +166,7 @@ */ private void evaluateExpressions() throws JspException { try { - setLocale(((Boolean) evalAttr("locale", getLocale() + "", + setLocale(((Boolean) evalAttr("locale", getLocaleExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -129,7 +174,7 @@ } try { - setXhtml(((Boolean) evalAttr("xhtml", getXhtml() + "", + setXhtml(((Boolean) evalAttr("xhtml", getXhtmlExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +55 -10 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELHiddenTag.java Index: ELHiddenTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELHiddenTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELHiddenTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELHiddenTag.java 14 Oct 2002 03:18:38 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.HiddenTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,48 @@ public class ELHiddenTag extends HiddenTag { /** + * String value of the "write" attribute. + */ + private String writeExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + + /** + * Returns the string value of the "write" attribute. + */ + public String getWriteExpr() { return (writeExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + + /** + * Sets the string value of the "write" attribute. This attribute is + * mapped to this method by the <code>ELHiddenTagBeanInfo</code> class. + */ + public void setWriteExpr(String writeExpr) + { this.writeExpr = writeExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELHiddenTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setWriteExpr(null); + setIndexedExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +133,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +142,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +151,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("hidden", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("hidden", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -132,7 +177,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -172,7 +217,7 @@ } try { - setWrite(((Boolean) evalAttr("write", getWrite() + "", + setWrite(((Boolean) evalAttr("write", getWriteExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +89 -12 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFrameTag.java Index: ELFrameTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFrameTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELFrameTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELFrameTag.java 14 Oct 2002 03:18:38 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.FrameTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -94,6 +94,80 @@ public class ELFrameTag extends FrameTag { /** + * String value of the "noresize" attribute. + */ + private String noresizeExpr; + /** + * String value of the "transaction" attribute. + */ + private String transactionExpr; + /** + * String value of the "marginheight" attribute. + */ + private String marginheightExpr; + /** + * String value of the "marginwidth" attribute. + */ + private String marginwidthExpr; + + /** + * Returns the string value of the "noresize" attribute. + */ + public String getNoresizeExpr() { return (noresizeExpr); } + /** + * Returns the string value of the "transaction" attribute. + */ + public String getTransactionExpr() { return (transactionExpr); } + /** + * Returns the string value of the "marginheight" attribute. + */ + public String getMarginheightExpr() { return (marginheightExpr); } + /** + * Returns the string value of the "marginwidth" attribute. + */ + public String getMarginwidthExpr() { return (marginwidthExpr); } + + /** + * Sets the string value of the "noresize" attribute. This attribute is + * mapped to this method by the <code>ELFrameTagBeanInfo</code> class. + */ + public void setNoresizeExpr(String noresizeExpr) + { this.noresizeExpr = noresizeExpr; } + + /** + * Sets the string value of the "transaction" attribute. This attribute is + * mapped to this method by the <code>ELFrameTagBeanInfo</code> class. + */ + public void setTransactionExpr(String transactionExpr) + { this.transactionExpr = transactionExpr; } + + /** + * Sets the string value of the "marginheight" attribute. This attribute is + * mapped to this method by the <code>ELFrameTagBeanInfo</code> class. + */ + public void setMarginheightExpr(String marginheightExpr) + { this.marginheightExpr = marginheightExpr; } + + /** + * Sets the string value of the "marginwidth" attribute. This attribute is + * mapped to this method by the <code>ELFrameTagBeanInfo</code> class. + */ + public void setMarginwidthExpr(String marginwidthExpr) + { this.marginwidthExpr = marginwidthExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setNoresizeExpr(null); + setTransactionExpr(null); + setMarginheightExpr(null); + setMarginwidthExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -105,7 +179,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -113,6 +188,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -120,8 +197,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("frame", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("button", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -175,7 +252,7 @@ try { setMarginheight(((Integer) evalAttr("marginheight", - getMarginheight() + "", + getMarginheightExpr(), Integer.class)). intValue()); } catch (NullAttributeException ex) { @@ -184,7 +261,7 @@ try { setMarginwidth(((Integer) evalAttr("marginwidth", - getMarginwidth() + "", + getMarginwidthExpr(), Integer.class)). intValue()); } catch (NullAttributeException ex) { @@ -198,7 +275,7 @@ } try { - setNoresize(((Boolean) evalAttr("noresize", getNoresize() + "", + setNoresize(((Boolean) evalAttr("noresize", getNoresizeExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -295,7 +372,7 @@ try { setTransaction(((Boolean) evalAttr("transaction", - getTransaction() + "", + getTransactionExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +56 -11 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFileTag.java Index: ELFileTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFileTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELFileTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELFileTag.java 14 Oct 2002 03:18:39 -0000 1.4 @@ -62,14 +62,14 @@ import org.apache.struts.taglib.html.FileTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** * Custom tag for input fields of type "file". *<p> * This class is a subclass of the class - * <code>org.apache.struts.taglib.bean.MessageTag</code> which provides most of + * <code>org.apache.struts.taglib.html.FileTag</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. @@ -80,6 +80,48 @@ public class ELFileTag extends FileTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELFileTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELFileTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + setIndexedExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +133,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +142,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +151,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("file", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("file", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -145,7 +190,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -153,7 +198,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +55 -10 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELCheckboxTag.java Index: ELCheckboxTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELCheckboxTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELCheckboxTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELCheckboxTag.java 14 Oct 2002 03:18:39 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.CheckboxTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,48 @@ public class ELCheckboxTag extends CheckboxTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELCheckboxTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELCheckboxTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + setIndexedExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +133,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +142,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +151,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("checkbox", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("checkbox", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -139,7 +184,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -147,7 +192,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +55 -10 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELButtonTag.java Index: ELButtonTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELButtonTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELButtonTag.java 1 Oct 2002 04:25:49 -0000 1.3 +++ ELButtonTag.java 14 Oct 2002 03:18:39 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.ButtonTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,48 @@ public class ELButtonTag extends ButtonTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + /** + * String value of the "indexed" attribute. + */ + private String indexedExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + /** + * Returns the string value of the "indexed" attribute. + */ + public String getIndexedExpr() { return (indexedExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELButtonTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Sets the string value of the "indexed" attribute. This attribute is + * mapped to this method by the <code>ELButtonTagBeanInfo</code> class. + */ + public void setIndexedExpr(String indexedExpr) + { this.indexedExpr = indexedExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + setIndexedExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +133,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +142,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +151,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("button", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("button", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -139,7 +184,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { @@ -147,7 +192,7 @@ } try { - setIndexed(((Boolean) evalAttr("indexed", getIndexed() + "", + setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { 1.4 +38 -9 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELCancelTag.java Index: ELCancelTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELCancelTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ELCancelTag.java 1 Oct 2002 04:25:50 -0000 1.3 +++ ELCancelTag.java 14 Oct 2002 03:18:39 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.struts.taglib.html.CancelTag; import javax.servlet.jsp.JspException; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; +import org.apache.strutsel.taglib.utils.EvalHelper; import org.apache.taglibs.standard.tag.common.core.NullAttributeException; /** @@ -80,6 +80,32 @@ public class ELCancelTag extends CancelTag { /** + * String value of the "disabled" attribute. + */ + private String disabledExpr; + + /** + * Returns the string value of the "disabled" attribute. + */ + public String getDisabledExpr() { return (disabledExpr); } + + /** + * Sets the string value of the "disabled" attribute. This attribute is + * mapped to this method by the <code>ELCancelTagBeanInfo</code> class. + */ + public void setDisabledExpr(String disabledExpr) + { this.disabledExpr = disabledExpr; } + + /** + * Resets attribute values for tag reuse. + */ + public void release() + { + super.release(); + setDisabledExpr(null); + } + + /** * Process the start tag. * * @exception JspException if a JSP exception has occurred @@ -91,7 +117,8 @@ /** * Evaluates and returns a single attribute value, given the attribute - * name, attribute value, and attribute type. It uses + * name, attribute value, and attribute type. It uses the + * <code>EvalHelper</code> class to interface to * <code>ExpressionUtil.evalNotNull</code> to do the actual evaluation, and * it passes to this the name of the current tag, the <code>this</code> * pointer, and the current pageContext. @@ -99,6 +126,8 @@ * @param attrName attribute name being evaluated * @param attrValue String value of attribute to be evaluated using EL * @param attrType Required resulting type of attribute value + * @exception NullAttributeException if either the <code>attrValue</code> + * was null, or the resulting evaluated value was null. * @return Resulting attribute value */ private Object evalAttr(String attrName, @@ -106,8 +135,8 @@ Class attrType) throws JspException, NullAttributeException { - return (ExpressionUtil.evalNotNull("cancel", attrName, attrValue, - attrType, this, pageContext)); + return (EvalHelper.eval("cancel", attrName, attrValue, attrType, + this, pageContext)); } /** @@ -139,7 +168,7 @@ } try { - setDisabled(((Boolean) evalAttr("disabled", getDisabled() + "", + setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) {
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>