public class IteratorTag
extends javax.servlet.jsp.tagext.SimpleTagSupport
IteratorStatus
Modifier and Type | Field and Description |
---|---|
protected int |
count |
protected int |
from |
protected java.lang.Object |
items |
protected IteratorStatus |
iteratorStatus |
protected int |
modulus |
protected java.lang.String |
scope |
protected java.lang.String |
status |
protected java.lang.String |
var |
Constructor and Description |
---|
IteratorTag() |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateTo(int from,
int count,
int size)
Calculates 'TO'.
|
void |
doTag() |
protected void |
iterateArray(java.lang.Object[] array,
int from,
int count,
javax.servlet.jsp.PageContext pageContext)
Iterates arrays.
|
protected void |
iterateCollection(java.util.Collection collection,
int from,
int count,
javax.servlet.jsp.PageContext pageContext)
Iterates collection.
|
void |
setCount(int count)
Sets count as total number of items to iterate.
|
void |
setFrom(int from)
Sets starting index.
|
void |
setItems(java.lang.Object items)
Specifies item collection.
|
void |
setModulus(int modulus)
Specifies modulus value for the iterator status
|
void |
setScope(java.lang.String scope)
Sets scope for all variables.
|
void |
setStatus(java.lang.String status)
Specifies status variable name.
|
void |
setVar(java.lang.String var)
Specifies variable name that will be used for item during iteration.
|
protected java.lang.Object items
protected java.lang.String var
protected java.lang.String status
protected int modulus
protected java.lang.String scope
protected int from
protected int count
protected IteratorStatus iteratorStatus
public void setItems(java.lang.Object items)
public void setVar(java.lang.String var)
public void setStatus(java.lang.String status)
public void setModulus(int modulus)
public void setScope(java.lang.String scope)
public void setFrom(int from)
public void setCount(int count)
public void doTag() throws javax.servlet.jsp.JspException
doTag
in interface javax.servlet.jsp.tagext.SimpleTag
doTag
in class javax.servlet.jsp.tagext.SimpleTagSupport
javax.servlet.jsp.JspException
protected int calculateTo(int from, int count, int size)
protected void iterateCollection(java.util.Collection collection, int from, int count, javax.servlet.jsp.PageContext pageContext) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
protected void iterateArray(java.lang.Object[] array, int from, int count, javax.servlet.jsp.PageContext pageContext) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
Copyright © 2003-present Jodd Team