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:
BodyTag, FunctionContainerOrNodeProvider, IterationTag, NodeProvider, Serializable, Tag, TagIdentifier
Direct Known Subclasses:
AbstractNodeListTag, NodeTag, RelatedNodeTag, TreeTag

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.37 2006/06/23 13:17:30 johannes Exp $
Author:
Michiel Meeuwissen, Kees Jongenburger
See Also:
Serialized Form

Field Summary
protected  Attribute fieldEscaper
           
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
 Query getGeneratingQuery()
          Returns a query which (a.o) results this Node.
 Node getNodeVar()
           
 void release()
          Release all allocated resources.
 void setCommitonclose(String c)
          Whether the node must be commited after the body of the tag if any changes occured
 void setFieldescape(String e)
           
 void setJspvar(String jv)
          NodeProviders support the jspvar attribute (giving a Node jsp var object).
protected  void setNodeVar(Node node)
           
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
fillStandardParameters, findNodeProvider, findNodeProvider, getLocale, getNode, setElement, setNode
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
findCloudProvider, findCloudProvider, getCloudContext, getCloudVar, getNode, getNodeOrNull, setCloud
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
findLoopOrQuery, findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getDefaultLocale, getEscapedValue, getId, getObject, getObjectConditional, getPageContext, getPageContextTag, getReferid, getString, getTaglibVersion, getTimeZone, getWriterValue, haveBody, setContext, setEscape, setId, setListdelimiter, 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 final NodeProviderHelper nodeHelper

fieldEscaper

protected Attribute fieldEscaper
Constructor Detail

AbstractNodeProviderTag

public AbstractNodeProviderTag()
Method Detail

setFieldescape

public void setFieldescape(String e)
                    throws JspTagException
Throws:
JspTagException
Since:
MMBase-1.8

setJspvar

public void setJspvar(String jv)
Description copied from interface: NodeProvider
NodeProviders support the jspvar attribute (giving a Node jsp var object).

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 method getNodeVar because we use tag attributes with name "node" and type String

setNodeVar

protected void setNodeVar(Node node)

setCommitonclose

public void setCommitonclose(String c)
                      throws JspTagException
Description copied from interface: NodeProvider
Whether the node must be commited after the body of the tag if any changes occured

Specified by:
setCommitonclose in interface NodeProvider
Throws:
JspTagException
Since:
MMBase-1.8

fillVars

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

Throws:
JspTagException

getGeneratingQuery

public Query getGeneratingQuery()
                         throws JspTagException
Description copied from interface: NodeProvider
Returns a query which (a.o) results this Node.

Specified by:
getGeneratingQuery in interface NodeProvider
Throws:
JspTagException

doAfterBody

public int doAfterBody()
                throws 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 IterationTag
Throws:
JspTagException

doEndTag

public int doEndTag()
             throws JspTagException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
JspTagException

release

public void release()
Description copied from class: ContextReferrerTag
Release all allocated resources.

Specified by:
release in interface Tag
Overrides:
release in class ContextReferrerTag


MMBase build 1.8.1.20060716