Devsphere.com


com.devsphere.xml.taglib.output.tag
Class Attributes

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--javax.servlet.jsp.tagext.BodyTagSupport
              |
              +--com.devsphere.xml.taglib.support.tag.CommonSupport
                    |
                    +--com.devsphere.xml.taglib.output.tag.OutputSupport
                          |
                          +--com.devsphere.xml.taglib.output.tag.Attributes
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class Attributes
extends OutputSupport

Handler for the <o:attributes> tag, which exports a variable holding a SAX list of attributes.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.devsphere.xml.taglib.output.tag.OutputSupport
ancestor, previousOut, serializer
 
Fields inherited from class com.devsphere.xml.taglib.support.tag.CommonSupport
cachedDebug, cachedLogger, DEBUG_ATTR, DEFAULT_DEBUG, DEFAULT_RESTORE_VALUE, DEFAULT_SCOPE, LOGGER_ATTR, originalValues
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
Attributes()
           
 
Method Summary
protected  void endOutput()
          Exports the attribute variable.
protected  java.util.List getAllowedAncestors()
          Returns the list of names of the tags that may contain the tag that is handled by this class.
protected  org.xml.sax.helpers.AttributesImpl getAttr()
          Returns the org.xml.sax.helpers.AttributesImpl object that holds the attributes.
 java.lang.String getTagName()
          Returns the name of the handled tag
protected  void init()
          Initializes the fields of this tag handler.
 void setCopy(java.lang.String copyExpr)
          Sets the initial attribute list, which is empty by default.
 void setScope(java.lang.String scope)
          Sets the scope of the variable exported by this tag handler.
 void setVar(java.lang.String var)
          Sets the name of the variable exported by this tag handler.
protected  void startOutput()
          Initializes the SAX object that holds the attributes.
 
Methods inherited from class com.devsphere.xml.taglib.output.tag.OutputSupport
doEndTag, doStartTag, emptyComment, initOutput, shouldBufferContent, shouldIgnoreContent
 
Methods inherited from class com.devsphere.xml.taglib.support.tag.CommonSupport
checkVarName, checkVarScope, doCatch, doFinally, eval, evalBoolean, evalDouble, evalInt, evalString, export, export, getDebug, getLogger, log, log, log, restore, validate
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

Attributes

public Attributes()
Method Detail

init

protected void init()
Initializes the fields of this tag handler.

Overrides:
init in class OutputSupport

getTagName

public java.lang.String getTagName()
Returns the name of the handled tag

Specified by:
getTagName in class CommonSupport
Returns:
the name of the handled tag

getAllowedAncestors

protected java.util.List getAllowedAncestors()
Returns the list of names of the tags that may contain the tag that is handled by this class.

Specified by:
getAllowedAncestors in class CommonSupport
Returns:
the list of names of the allowed ancestor tags or null if the tag context doesn't matter.

getAttr

protected org.xml.sax.helpers.AttributesImpl getAttr()
Returns the org.xml.sax.helpers.AttributesImpl object that holds the attributes.

Returns:
the SAX object that holds the attributes

setVar

public void setVar(java.lang.String var)
            throws javax.servlet.jsp.JspException
Sets the name of the variable exported by this tag handler. The value of the variable will be the SAX object that holds the attributes.

Parameters:
var - the name of the variable
Throws:
javax.servlet.jsp.JspException - to signal any error that might occur

setScope

public void setScope(java.lang.String scope)
              throws javax.servlet.jsp.JspException
Sets the scope of the variable exported by this tag handler.

Parameters:
scope - the scope of the variable
Throws:
javax.servlet.jsp.JspException - to signal any error that might occur

setCopy

public void setCopy(java.lang.String copyExpr)
             throws javax.servlet.jsp.JspException
Sets the initial attribute list, which is empty by default. The value of the evaluated expression is expected to be a org.xml.sax.helpers.AttributesImpl object. The exported list will contain copies of all attributes of the given initial list.

Throws:
javax.servlet.jsp.JspException - to signal any error that might occur

startOutput

protected void startOutput()
                    throws javax.servlet.jsp.JspException,
                           org.xml.sax.SAXException
Initializes the SAX object that holds the attributes.

Specified by:
startOutput in class OutputSupport
Throws:
javax.servlet.jsp.JspException - to signal an error
org.xml.sax.SAXException - to signal an error

endOutput

protected void endOutput()
                  throws javax.servlet.jsp.JspException,
                         org.xml.sax.SAXException
Exports the attribute variable.

Specified by:
endOutput in class OutputSupport
Throws:
javax.servlet.jsp.JspException - to signal an error
org.xml.sax.SAXException - to signal an error

 Devsphere.com