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 java.lang.Object
implements NodeProvider

Since:
MMBase-1.7
Version:
$Id: NodeProviderHelper.java,v 1.2.2.1 2004/07/05 17:19:59 michiel Exp $
Author:
Michiel Meeuwissen

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
 java.lang.String getId()
           
 boolean getModified()
           
 Node getNodeVar()
          For use by children, they can find the current 'node' belonging to this tag.
 void setJspvar(java.lang.String jv)
           
 void setModified()
           
 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
 

Constructor Detail

NodeProviderHelper

public NodeProviderHelper(ContextReferrerTag thisTag)
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
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

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.


getId

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

public boolean getModified()

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.

Throws:
javax.servlet.jsp.JspTagException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException


MMBase build 1.7.1.20041002