org.mmbase.bridge.jsp.taglib
Class AbstractNodeProviderTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended byorg.mmbase.bridge.jsp.taglib.CloudReferrerTag
                  extended byorg.mmbase.bridge.jsp.taglib.NodeReferrerTag
                      extended byorg.mmbase.bridge.jsp.taglib.AbstractNodeProviderTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, FunctionContainerOrNodeProvider, javax.servlet.jsp.tagext.IterationTag, NodeProvider, java.io.Serializable, javax.servlet.jsp.tagext.Tag, TagIdentifier
Direct Known Subclasses:
AbstractNodeListTag, NodeTag, PostTag, RelatedNodeTag, TreeTag, 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

Version:
$Id: AbstractNodeProviderTag.java,v 1.30 2004/03/23 21:42:46 michiel Exp $
Author:
Michiel Meeuwissen, Kees Jongenburger
See Also:
Serialized Form

Field Summary
protected  NodeProviderHelper nodeHelper
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
parentNodeId
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
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()
           
protected  void fillVars()
          Fill the jsp and context vars
protected  boolean getModified()
           
 Node getNodeVar()
           
 void setJspvar(java.lang.String jv)
           
 void setModified()
           
protected  void setNodeVar(Node node)
           
 
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, getCloudVar, getNode, getNodeOrNull, setCloud
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getId, getLocale, getObject, getPageContext, getReferid, getString, getWriterValue, haveBody, release, setContext, setEscape, setId, setPageContext, setReferid, setVartype, setWrite, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, 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
 

Field Detail

nodeHelper

protected NodeProviderHelper nodeHelper
Constructor Detail

AbstractNodeProviderTag

public AbstractNodeProviderTag()
Method Detail

setJspvar

public void setJspvar(java.lang.String jv)
Specified by:
setJspvar in interface NodeProvider
Overrides:
setJspvar in class ContextReferrerTag

getNodeVar

public Node getNodeVar()
Specified by:
getNodeVar in interface 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)

fillVars

protected void fillVars()
                 throws javax.servlet.jsp.JspTagException
Fill the jsp and context vars

Throws:
javax.servlet.jsp.JspTagException

setModified

public void setModified()
Specified by:
setModified in interface NodeProvider

getModified

protected boolean getModified()
Since:
MMBase-1.7

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.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspTagException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
javax.servlet.jsp.JspTagException


MMBase build 1.7.1.20041002