org.mmbase.bridge.jsp.taglib.tree
Class TreeTag
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
org.mmbase.bridge.jsp.taglib.tree.TreeTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, ContainerReferrer, ContextProvider, DepthProvider, FunctionContainerOrNodeProvider, javax.servlet.jsp.tagext.IterationTag, ListProvider, NodeProvider, QueryContainerOrListProvider, QueryContainerReferrer, java.io.Serializable, javax.servlet.jsp.tagext.Tag, TagIdentifier, TreeProvider
- public class TreeTag
- extends AbstractNodeProviderTag
- implements TreeProvider, QueryContainerReferrer
Implements mm:tree. Which works about like this
<mm:relatednodescontainer type="object" searchdirs="destination">
<mm:tree type="object" searchdir="destination" maxdepth="8">
<mm:grow>
<ul class="<mm:depth" />"><mm:onshrink></ul></mm:onshrink>
</mm:grow>
<li><mm:depth />: <mm:nodeinfo type="guitype" />: <mm:field name="number" /> <mm:function name="gui" escape="none" />
<mm:onshrink></li></mm:onshrink>
<mm:shrink />
<mm:last>SIZE : <mm:size /></mm:last>
</mm:tree>
</mm:relatednodescontainer>
- Since:
- MMBase-1.7
- Version:
- $Id: TreeTag.java,v 1.6.2.5 2004/07/26 20:12:14 nico Exp $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| 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 |
| 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 |
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 javax.servlet.jsp.tagext.Tag |
getParent, setParent |
timerHandle
protected int timerHandle
container
protected Attribute container
nodeManager
protected Attribute nodeManager
role
protected Attribute role
searchDir
protected Attribute searchDir
maxDepth
protected Attribute maxDepth
orderby
protected Attribute orderby
directions
protected Attribute directions
TreeTag
public TreeTag()
setContainer
public void setContainer(java.lang.String c)
throws javax.servlet.jsp.JspTagException
- Description copied from interface:
ContainerReferrer
- If it should not use parent container
- Specified by:
setContainer in interface ContainerReferrer
- Throws:
javax.servlet.jsp.JspTagException
setType
public void setType(java.lang.String n)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException
setRole
public void setRole(java.lang.String r)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException
setSearchdir
public void setSearchdir(java.lang.String sd)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException
setMaxdepth
public void setMaxdepth(java.lang.String md)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException
setOrderby
public void setOrderby(java.lang.String o)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException- Since:
- MMBase 1.7.1
setDirections
public void setDirections(java.lang.String d)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException- Since:
- MMBase 1.7.1
getShrinkStack
public java.util.Stack getShrinkStack()
- Specified by:
getShrinkStack in interface TreeProvider
getContextContainer
public ContextContainer getContextContainer()
throws javax.servlet.jsp.JspTagException
- Specified by:
getContextContainer in interface ContextProvider
- Throws:
javax.servlet.jsp.JspTagException
size
public int size()
- Specified by:
size in interface ListProvider
- Returns:
- the size of the list
getIndex
public int getIndex()
- Specified by:
getIndex in interface ListProvider
- Returns:
- the index of the current item in a list
getIndexOffset
public int getIndexOffset()
- Specified by:
getIndexOffset in interface ListProvider
- Returns:
- The offset of the index (normally this will return 1)
isChanged
public boolean isChanged()
- Specified by:
isChanged in interface ListProvider
- Returns:
- a boolean indicating wether the field on which was
sorted is changed.
getCurrent
public java.lang.Object getCurrent()
- Specified by:
getCurrent in interface ListProvider
- Returns:
- the current item in a list
remove
public void remove()
- Description copied from interface:
ListProvider
- Removes the current item from the list.
- Specified by:
remove in interface ListProvider
getPreviousDepth
public int getPreviousDepth()
- Specified by:
getPreviousDepth in interface TreeProvider
getDepth
public int getDepth()
- Description copied from interface:
DepthProvider
- Returns the 'size' of the current cluster node (the number of steps (minus the relation steps))
- Specified by:
getDepth in interface DepthProvider
getNextDepth
public int getNextDepth()
- Specified by:
getNextDepth in interface TreeProvider
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspTagException
- Performs the search
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
- Throws:
javax.servlet.jsp.JspTagException
doInitBody
public void doInitBody()
throws javax.servlet.jsp.JspTagException
- Specified by:
doInitBody in interface javax.servlet.jsp.tagext.BodyTag
- Throws:
javax.servlet.jsp.JspTagException
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspTagException
- Description copied from class:
AbstractNodeProviderTag
- 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- Overrides:
doAfterBody in class AbstractNodeProviderTag
- 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 AbstractNodeProviderTag
- Throws:
javax.servlet.jsp.JspTagException
MMBase build 1.7.1.20041002