|
Devsphere.com |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--com.devsphere.xml.taglib.support.tag.CommonSupport
|
+--com.devsphere.xml.taglib.process.tag.ProcessSupport
|
+--com.devsphere.xml.taglib.process.tag.Element
Handler for the <p:element> tag, whose body may process a DOM sub-tree
or may contain sub-tags that process the SAX events that are generated
between a startElement() event and an endElement()
event. It exports variables that hold the element's namespace URI, local
name, qualified name and attributes. It may also export a variable
holding the root of a DOM sub-tree, in which case the body may not contain
any tags of this library. If the varDom attribute isn't present,
no DOM variable is exported and the body may contain a <p:start> tag
for processing the startElement() SAX event, followed by
one or more <p:element> and <p:data> tags for processing
the sub-elements and the character data, followed by an optional
<p:end> tag for processing the endElement() SAX event.
| Field Summary |
| Fields inherited from class com.devsphere.xml.taglib.process.tag.ProcessSupport |
ancestor, event, handler, indentLevel |
| 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 | |
Element()
|
|
| Method Summary | |
protected boolean |
continueLoop()
Returns true if the current event could be processed
by a sub-tag. |
protected boolean |
evalTests()
Evaluates the test conditions. |
protected void |
exportVariables()
Exports the element variables. |
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 |
boolean |
getWantDOM()
Returns true if the body of this tag will process a DOM tree. |
protected void |
init()
Initializes the fields of this tag handler. |
protected void |
initLoop()
Initializes the loop to process element events. |
void |
setScope(java.lang.String scope)
Sets the default scope for the variables exported by this tag handler. |
void |
setScopeAttr(java.lang.String scopeAttr)
Sets the scope of the attr variable exported by this tag handler. |
void |
setScopeDom(java.lang.String scopeDom)
Sets the scope of the dom variable exported by this tag handler. |
void |
setScopeName(java.lang.String scopeName)
Sets the scope of the name variable exported by this tag handler. |
void |
setScopeQname(java.lang.String scopeQname)
Sets the scope of the qname variable exported by this tag handler. |
void |
setScopeUri(java.lang.String scopeUri)
Sets the scope of the uri variable exported by this tag handler. |
void |
setTest(java.lang.String testExpr)
If this expression is present and it evaluates to false (the test is negative), the event loop will not be started. |
void |
setTestName(java.lang.String testNameExpr)
Sets the expression whose value will be compared with the element's local name. |
void |
setTestQname(java.lang.String testQnameExpr)
Sets the expression whose value will be compared with the element's qualified name. |
void |
setTestUri(java.lang.String testUriExpr)
Sets the expression whose value will be compared with the element's namespace URI. |
void |
setVarAttr(java.lang.String varAttr)
Sets the name of the attr variable exported by this tag handler. |
void |
setVarDom(java.lang.String varDom)
Sets the name of the dom variable exported by this tag handler. |
void |
setVarName(java.lang.String varName)
Sets the name of the name variable exported by this tag handler. |
void |
setVarQname(java.lang.String varQname)
Sets the name of the qname variable exported by this tag handler. |
void |
setVarUri(java.lang.String varUri)
Sets the name of the uri variable exported by this tag handler. |
protected boolean |
startLoop()
Returns true if the current event is a
StartElement instance and all tests are passed. |
| Methods inherited from class com.devsphere.xml.taglib.process.tag.ProcessSupport |
doAfterBody, doEndTag, doFinally, doStartTag, finalizeLoop, getEvent, logEvent, logEvent, removeEvent, validate |
| Methods inherited from class com.devsphere.xml.taglib.support.tag.CommonSupport |
checkVarName, checkVarScope, doCatch, eval, evalBoolean, evalDouble, evalInt, evalString, export, export, getDebug, getLogger, log, log, log, restore |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
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 |
public Element()
| Method Detail |
protected void init()
init in class ProcessSupportpublic java.lang.String getTagName()
getTagName in class CommonSupportpublic boolean getWantDOM()
true if the dom variable must be exported.protected java.util.List getAllowedAncestors()
getAllowedAncestors in class CommonSupportnull if the tag context doesn't matter.
public void setVarUri(java.lang.String varUri)
throws javax.servlet.jsp.JspException
uri.
varUri - the name of the uri variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setScopeUri(java.lang.String scopeUri)
throws javax.servlet.jsp.JspException
scopeUri - the scope of the uri variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setTestUri(java.lang.String testUriExpr)
throws javax.servlet.jsp.JspException
testUriExpr - the expression for testing the URI
javax.servlet.jsp.JspException - to signal any error that might occur
public void setVarName(java.lang.String varName)
throws javax.servlet.jsp.JspException
name.
varName - the name of the name variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setScopeName(java.lang.String scopeName)
throws javax.servlet.jsp.JspException
scopeName - the scope of the name variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setTestName(java.lang.String testNameExpr)
throws javax.servlet.jsp.JspException
testNameExpr - the expression for testing the local name
javax.servlet.jsp.JspException - to signal any error that might occur
public void setVarQname(java.lang.String varQname)
throws javax.servlet.jsp.JspException
qname.
javax.servlet.jsp.JspException - to signal any error that might occur
public void setScopeQname(java.lang.String scopeQname)
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException - to signal any error that might occur
public void setTestQname(java.lang.String testQnameExpr)
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException - to signal any error that might occur
public void setVarAttr(java.lang.String varAttr)
throws javax.servlet.jsp.JspException
attr.
varAttr - the name of the attr variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setScopeAttr(java.lang.String scopeAttr)
throws javax.servlet.jsp.JspException
scopeAttr - the scope of the attr variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setTest(java.lang.String testExpr)
throws javax.servlet.jsp.JspException
testExpr - the expression that will be evaluated
javax.servlet.jsp.JspException - to signal any error that might occur
public void setVarDom(java.lang.String varDom)
throws javax.servlet.jsp.JspException
varDom - the name of the dom variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setScopeDom(java.lang.String scopeDom)
throws javax.servlet.jsp.JspException
scopeDom - the scope of the dom variable
javax.servlet.jsp.JspException - to signal any error that might occur
public void setScope(java.lang.String scope)
throws javax.servlet.jsp.JspException
scope - the default scope of the exported variables
javax.servlet.jsp.JspException - to signal any error that might occur
protected void initLoop()
throws javax.servlet.jsp.JspException
initLoop in class ProcessSupportjavax.servlet.jsp.JspException - to signal any tag validation errorprotected void exportVariables()
protected boolean evalTests()
throws javax.servlet.jsp.JspException
true is all tests are passed
javax.servlet.jsp.JspException - to signal any error that might occur
protected boolean startLoop()
throws javax.servlet.jsp.JspException
true if the current event is a
StartElement instance and all tests are passed.
startLoop in class ProcessSupporttrue if the event loop should be started
javax.servlet.jsp.JspException - to signal an error
protected boolean continueLoop()
throws javax.servlet.jsp.JspException
true if the current event could be processed
by a sub-tag.
continueLoop in class ProcessSupporttrue if the event loop should be continued
javax.servlet.jsp.JspException - to signal an error
|
Devsphere.com |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||