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

Author:
Michiel Meeuwissen, Kees Jongenburger
See Also:
Serialized Form

Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, PAGE_CATEGORY, pageContextTag, referid, writerid
 
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
AbstractNodeProviderTag()
           
 
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.NodeReferrerTag
findNodeProvider, findNodeProvider, getNode, setNode
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
findCloudProvider, findCloudProvider, getCloud, getCloudContext, getNode, getNodeOrNull, setCloud
 
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 org.mmbase.bridge.jsp.taglib.TagIdentifier
getId
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Constructor Detail

AbstractNodeProviderTag

public AbstractNodeProviderTag()
Method Detail

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