org.mmbase.bridge.jsp.taglib
Class AbstractNodeProviderTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--org.mmbase.bridge.jsp.taglib.ContextReferrerTag
|
+--org.mmbase.bridge.jsp.taglib.CloudReferrerTag
|
+--org.mmbase.bridge.jsp.taglib.NodeReferrerTag
|
+--org.mmbase.bridge.jsp.taglib.AbstractNodeProviderTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, NodeProvider, java.io.Serializable, javax.servlet.jsp.tagext.Tag, TagIdentifier
- Direct Known Subclasses:
- AbstractNodeListTag, NodeTag, PostTag, RelatedNodeTag, UpdateTag
- public abstract class AbstractNodeProviderTag
- extends NodeReferrerTag
- implements NodeProvider
A base class for tags which provide a node. The
general attributes for a NodeProvider are
- id: The identifier. Used as a key for the Context. If this
attribute is missing, the Node variable will not be imported in the Context.
- jspvar: An identifier for a jsp variable available in the
body. If this attribute is missing, no jsp-variable will be
created.
- Author:
- Michiel Meeuwissen, Kees Jongenburger
- See Also:
- Serialized Form
| 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 |
|
Method Summary |
int |
doAfterBody()
Does everything needed on the afterbody tag of every
NodeProvider. |
int |
doEndTag()
|
abstract void |
doInitBody()
|
protected void |
fillVars()
Fill the jsp and context vars |
Node |
getNodeVar()
For use by children, they can find the current 'node' belonging
to this tag. |
void |
setJspvar(java.lang.String jv)
|
void |
setModified()
|
protected void |
setNodeVar(Node node)
Children can also directly access the node member, but the
prefered method is to treat this variable as much as possible
as private, and use this. |
| Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
findParentTag, findParentTag, findWriter, findWriter, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContextTag, getObject, getReferid, getString, release, setContext, setPageContext, setReferid, setWriter |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doStartTag, getBodyContent, getPreviousOut, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, 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, setParent |
AbstractNodeProviderTag
public AbstractNodeProviderTag()
setJspvar
public void setJspvar(java.lang.String jv)
- Specified by:
setJspvar in interface NodeProvider
getNodeVar
public Node getNodeVar()
- For use by children, they can find the current 'node' belonging
to this tag.
- Specified by:
getNodeVar in interface NodeProvider
- Following copied from interface:
org.mmbase.bridge.jsp.taglib.NodeProvider
- Returns:
- the node contained in the tag
NOTE: we have decided to call this methid getNodeVar because
we use tag attributes with name "node" and type String
setNodeVar
protected void setNodeVar(Node node)
- Children can also directly access the node member, but the
prefered method is to treat this variable as much as possible
as private, and use this.
doInitBody
public abstract void doInitBody()
throws javax.servlet.jsp.JspTagException
- Overrides:
doInitBody in class javax.servlet.jsp.tagext.BodyTagSupport
fillVars
protected void fillVars()
throws javax.servlet.jsp.JspTagException
- Fill the jsp and context vars
setModified
public void setModified()
- Specified by:
setModified in interface NodeProvider
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspTagException
- Does everything needed on the afterbody tag of every
NodeProvider. Normally this function would be overrided with
one that has to call super.doAfterBody(). But not all servlet
engines to call this function if there is no body. So, in that
case it should be called from doEndTag, if the tag can do
something without a body.
- Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspTagException
- Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
MMBase build 1.6.5.20030923