Class TagBase

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
    Direct Known Subclasses:
    AnchorTag, DivTag, TextTag, UrlTag

    public abstract class TagBase
    extends CpnlBodyTagSupport
    implements javax.servlet.jsp.tagext.DynamicAttributes
    an abstract base tag implementation to generate HTML tags with dynamic attributes and an optional condition
    See Also:
    Serialized Form
    • Constructor Detail

      • TagBase

        public TagBase()
    • Method Detail

      • clear

        protected void clear()
        Description copied from class: CpnlBodyTagSupport
        Reset all member variables to the (default) start values. Called prior processing the tag and at release time.
        Overrides:
        clear in class CpnlBodyTagSupport
      • getDefaultTagName

        protected abstract String getDefaultTagName()
      • setTagName

        public void setTagName​(String tagName)
        Parameters:
        tagName - the tagName to set
      • getTagName

        protected String getTagName()
      • getClasses

        public String getClasses()
      • setClasses

        public void setClasses​(String classes)
      • setTest

        public void setTest​(Object value)
        the 'test' expression for conditional tags
      • getTestResult

        protected boolean getTestResult()
        evaluates the test expression if present and returns the evaluation result; default: 'true'
      • acceptDynamicAttribute

        protected boolean acceptDynamicAttribute​(String key,
                                                 Object value)
        extension hook to check and filter dynamic attributes
      • setDynamicAttribute

        public void setDynamicAttribute​(String namespace,
                                        String name,
                                        Object value)
        interface: DynamicAttributes
        Specified by:
        setDynamicAttribute in interface javax.servlet.jsp.tagext.DynamicAttributes
      • writeAttributes

        protected void writeAttributes​(javax.servlet.jsp.JspWriter writer)
                                throws IOException
        Throws:
        IOException
      • renderTag

        protected boolean renderTag()
        if this returns 'false' nothing is rendered (extension hook; returns the test result)
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class CpnlBodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • renderTagStart

        protected void renderTagStart()
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • renderTagEnd

        protected void renderTagEnd()