Devsphere.com


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

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.PI
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 PI
extends OutputSupport

Handler for the <o:pi> tag that outputs an XML processing instruction.

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
PI()
           
 
Method Summary
protected  void endOutput()
          Outputs the processing instruction.
protected  java.util.List getAllowedAncestors()
          Returns the list of names of the tags that may contain the tag that is handled by this class.
 java.lang.String getTagName()
          Returns the name of the handled tag
protected  void init()
          Initializes the fields of this tag handler.
 void setData(java.lang.String dataExpr)
          Sets the data of the processing instruction.
 void setTarget(java.lang.String targetExpr)
          Sets the target of the processing instruction.
protected  boolean shouldBufferContent()
          Returns false if the data attribute is present.
protected  boolean shouldIgnoreContent()
          Returns true if the data attribute is present.
protected  void startOutput()
          Does nothing.
 
Methods inherited from class com.devsphere.xml.taglib.output.tag.OutputSupport
doEndTag, doStartTag, emptyComment, initOutput
 
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

PI

public PI()
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.

setTarget

public void setTarget(java.lang.String targetExpr)
               throws javax.servlet.jsp.JspException
Sets the target of the processing instruction.

Parameters:
targetExpr - the expression that will be evaluated
Throws:
javax.servlet.jsp.JspException - to signal any error that might occur

setData

public void setData(java.lang.String dataExpr)
             throws javax.servlet.jsp.JspException
Sets the data of the processing instruction.

Parameters:
dataExpr - the expression that will be evaluated
Throws:
javax.servlet.jsp.JspException - to signal any error that might occur

shouldIgnoreContent

protected boolean shouldIgnoreContent()
Returns true if the data attribute is present.

Overrides:
shouldIgnoreContent in class OutputSupport
Returns:
a flag indicating whether the body content of this tag should be ignored or evaluated

shouldBufferContent

protected boolean shouldBufferContent()
Returns false if the data attribute is present.

Overrides:
shouldBufferContent in class OutputSupport
Returns:
a flag indicating whether the body content of this tag should be ignored or evaluated

startOutput

protected void startOutput()
                    throws javax.servlet.jsp.JspException,
                           org.xml.sax.SAXException
Does nothing.

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
Outputs the processing instruction.

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