org.mmbase.bridge.jsp.taglib
Class NodeProviderHelper

java.lang.Object
  extended byorg.mmbase.bridge.jsp.taglib.NodeProviderHelper
All Implemented Interfaces:
FunctionContainerOrNodeProvider, NodeProvider, TagIdentifier

public class NodeProviderHelper
extends Object
implements NodeProvider

Since:
MMBase-1.7
Version:
$Id: NodeProviderHelper.java,v 1.21 2006/07/12 11:39:55 michiel Exp $
Author:
Michiel Meeuwissen

Field Summary
static String _NODE
           
static String STACK_ATTRIBUTE
           
 
Constructor Summary
NodeProviderHelper(ContextReferrerTag thisTag)
           
 
Method Summary
 int doAfterBody()
          Does everything needed on the afterbody tag of every NodeProvider.
 int doEndTag()
           
 void fillVars()
          Fill the jsp and context vars
 Query getGeneratingQuery()
          Returns a query which (a.o) results this Node.
 String getId()
           
 Node getNodeVar()
          For use by children, they can find the current 'node' belonging to this tag.
 void release()
           
 void setCommitonclose(String c)
          Whether the node must be commited after the body of the tag if any changes occured
 void setGeneratingQuery(Query q)
           
 void setJspvar(String jv)
          NodeProviders support the jspvar attribute (giving a Node jsp var object).
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STACK_ATTRIBUTE

public static final String STACK_ATTRIBUTE
See Also:
Constant Field Values

_NODE

public static final String _NODE
See Also:
Constant Field Values
Constructor Detail

NodeProviderHelper

public NodeProviderHelper(ContextReferrerTag thisTag)
Method Detail

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

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

getNodeVar

public Node getNodeVar()
For use by children, they can find the current 'node' belonging to this tag.

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

public 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.


setGeneratingQuery

public void setGeneratingQuery(Query q)

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

getId

public String getId()
Specified by:
getId in interface TagIdentifier
Returns:
the String id the the tag. Id is is a user defined identifier

fillVars

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

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.

Throws:
JspTagException

doEndTag

public int doEndTag()
             throws JspTagException
Throws:
JspTagException

release

public void release()


MMBase build 1.8.1.20060716