org.mmbase.bridge.jsp.taglib.functions
Class NodeListFunctionTag
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.functions.AbstractFunctionTag
org.mmbase.bridge.jsp.taglib.functions.NodeListFunctionTag
- All Implemented Interfaces:
- Serializable, LoopTag, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally, ContainerReferrer, FunctionContainerOrNodeProvider, FunctionContainerReferrer, ContextProvider, ListProvider, NodeProvider, TagIdentifier
public class NodeListFunctionTag
- extends AbstractFunctionTag
- implements ListProvider, FunctionContainerReferrer, NodeProvider
A function tag for functions returning a NodeList. The result is iterated.
This is one of the most straightforward ListProvider/NodeProvider implementations, you could use it as a template.
- Since:
- MMBase-1.7
- Version:
- $Id: NodeListFunctionTag.java 35335 2009-05-21 08:14:41Z michiel $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Fields inherited from class org.mmbase.bridge.jsp.taglib.functions.AbstractFunctionTag |
add, container, functionClass, functionSet, module, name, nodeManager, parametersAttr, referids, remove, retain, THISPAGE |
| Methods inherited from class org.mmbase.bridge.jsp.taglib.functions.AbstractFunctionTag |
getFunction, getFunction, getFunction, getFunctionValue, getFunctionValue, setClassname, setContainer, setModule, setName, setNodemanager, setParameters, setReferids, setSet, useCollectionMethods |
| Methods inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag |
fillStandardParameters, findNode, findNodeProvider, findNodeProvider, getCloudVar, getLocale, getNode, getNode, getNodeFromPageContext, initTag, setElement, setNode |
| Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
appendMoreParameters, doCatch, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setListdelimiter, setPageContext, setReferid, setVartype, setWrite, setWriter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeListFunctionTag
public NodeListFunctionTag()
getNodeVar
public Node getNodeVar()
throws JspTagException
- 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
- 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
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
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
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 Object getCurrent()
- Specified by:
getCurrent in interface LoopTag- 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
setMax
public void setMax(String m)
throws JspTagException
- Throws:
JspTagException
setOffset
public void setOffset(String o)
throws JspTagException
- Throws:
JspTagException
setComparator
public void setComparator(String c)
throws JspTagException
- Throws:
JspTagException
setAdd
public void setAdd(String c)
throws JspTagException
- Specified by:
setAdd in interface ListProvider- Overrides:
setAdd in class AbstractFunctionTag
- Throws:
JspTagException
setRetain
public void setRetain(String c)
throws JspTagException
- Specified by:
setRetain in interface ListProvider- Overrides:
setRetain in class AbstractFunctionTag
- Throws:
JspTagException
setRemove
public void setRemove(String c)
throws JspTagException
- Specified by:
setRemove in interface ListProvider- Overrides:
setRemove in class AbstractFunctionTag
- Throws:
JspTagException
setVarStatus
public void setVarStatus(String s)
throws JspTagException
- Throws:
JspTagException
getContextContainer
public ContextContainer getContextContainer()
throws JspTagException
- Specified by:
getContextContainer in interface ContextProvider
- Throws:
JspTagException
doStartTag
public int doStartTag()
throws JspTagException
- Specified by:
doStartTag in interface Tag- Overrides:
doStartTag in class NodeReferrerTag
- Throws:
JspTagException
doAfterBody
public int doAfterBody()
throws JspException
- Specified by:
doAfterBody in interface IterationTag- Overrides:
doAfterBody in class BodyTagSupport
- Throws:
JspException
doEndTag
public int doEndTag()
throws JspTagException
- Specified by:
doEndTag in interface Tag- Overrides:
doEndTag in class NodeReferrerTag
- Throws:
JspTagException
doFinally
public void doFinally()
- Specified by:
doFinally in interface TryCatchFinally- Overrides:
doFinally in class ContextReferrerTag
getLoopStatus
public LoopTagStatus getLoopStatus()
- Specified by:
getLoopStatus in interface LoopTag
MMBase 2.0-SNAPSHOT - null