|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport info.magnolia.cms.taglibs.BaseContentTag info.magnolia.cms.taglibs.ContentNodeIterator
public class ContentNodeIterator
Iterate over contentNode collection. contentNodeIterator is used whenever you want to loop over content, typically paragraphs. A parameter contentNodeCollectionName will contain the name of the contentNode you are looping over. contentNodeCollectionName is created by providing a newBar with the corresponding name. This will result in elements being created within that contentNode, and thus allow you to loop over these.
Field Summary | |
---|---|
protected int |
begin
Tag attribute. |
static String |
CONTENT_NODE_COLLECTION_NAME
Deprecated. |
protected int |
count
|
protected Object |
current
|
protected static String |
CURRENT_INDEX
Deprecated. use the varStatus tag attribute to get a reference to a
javax.servlet.jsp.jstl.core.LoopTagStatus instance. |
protected Integer |
end
Tag attribute. |
protected int |
index
|
protected int |
size
|
protected static String |
SIZE
Deprecated. use the varStatus tag attribute to get a reference to a
javax.servlet.jsp.jstl.core.LoopTagStatus instance. |
protected int |
step
Tag attribute. |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
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 | |
---|---|
ContentNodeIterator()
|
Method Summary | |
---|---|
int |
doAfterBody()
|
int |
doEndTag()
|
int |
doStartTag()
|
protected javax.servlet.jsp.jstl.core.LoopTagStatus |
getLoopStatus()
|
void |
reset()
|
void |
setBegin(int index)
Zero-based index of first item to process, inclusive. |
void |
setContentNodeName(String name)
TODO : provide relevant doc for this attribute -- only overriden to do so. |
void |
setEnd(Integer index)
Zero-based index of last item to process, inclusive. |
void |
setItems(Collection items)
if this attribute is set, the tag will iterate on the collection directly passed here instead of fetching the collection named by contentNodeCollectionName. |
void |
setNodeDataName(String name)
Set the node data name, e.g. |
void |
setStep(int step)
Process every stepth element (e.g 2 = every second element). |
void |
setVarStatus(String varStatus)
Name of variable to hold the loop status with the following properties: index: position of the current item; count: number of times through the loop (starting with 1); first: boolean indicator if this is the first iteration; last: boolean indicator if this is the last iteration. |
Methods inherited from class info.magnolia.cms.taglibs.BaseContentTag |
---|
getContentNode, getContentNodeCollectionName, getContentNodeName, getCurrentPage, getFirstMatchingNode, getFirtMatchingNode, getNodeDataName, getPath, getRepository, getUuid, isActpage, release, resolveNode, setActpage, setContentNode, setContentNodeCollectionName, setInherit, setPath, setRepository, setUuid |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONTENT_NODE_COLLECTION_NAME
protected static final String CURRENT_INDEX
varStatus
tag attribute to get a reference to a
javax.servlet.jsp.jstl.core.LoopTagStatus
instance.protected static final String SIZE
varStatus
tag attribute to get a reference to a
javax.servlet.jsp.jstl.core.LoopTagStatus
instance.protected int begin
protected Integer end
protected int step
protected int size
protected int count
protected int index
protected Object current
Constructor Detail |
---|
public ContentNodeIterator()
Method Detail |
---|
public void setBegin(int index)
public void setEnd(Integer index)
public void setStep(int step)
public void setVarStatus(String varStatus)
public void setItems(Collection items)
public void setNodeDataName(String name)
BaseContentTag
setNodeDataName
in class BaseContentTag
public void setContentNodeName(String name)
setContentNodeName
in class BaseContentTag
protected javax.servlet.jsp.jstl.core.LoopTagStatus getLoopStatus()
public int doStartTag()
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
public int doAfterBody()
doAfterBody
in interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
in class javax.servlet.jsp.tagext.TagSupport
public int doEndTag()
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |