|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jett.tag.BaseTag
net.sf.jett.tag.BaseLoopTag
net.sf.jett.tag.ForTag
public class ForTag
A ForTag represents a repetitively placed Block
of Cells, with each repetition corresponding to an increment of
an index.
BaseTag.BaseLoopTag.Stringintintint
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_END
Attribute for specifying the ending value (included in the range). |
static java.lang.String |
ATTR_START
Attribute for specifying the starting value. |
static java.lang.String |
ATTR_STEP
Attribute for specifying how much the value increments per iteration. |
static java.lang.String |
ATTR_VAR
Attribute for specifying the name of the looping variable. |
| Fields inherited from class net.sf.jett.tag.BaseLoopTag |
|---|
ATTR_COLLAPSE, ATTR_COPY_RIGHT, ATTR_FIXED, ATTR_GROUP_DIR, ATTR_ON_LOOP_PROCESSED, ATTR_PAST_END_ACTION, GROUP_DIR_COLS, GROUP_DIR_NONE, GROUP_DIR_ROWS, PAST_END_ACTION_CLEAR, PAST_END_ACTION_REMOVE |
| Fields inherited from class net.sf.jett.tag.BaseTag |
|---|
ATTR_ON_PROCESSED, SPEC_SEP |
| Constructor Summary | |
|---|---|
ForTag()
|
|
| Method Summary | |
|---|---|
protected void |
afterBlockProcessed(TagContext context,
Block currBlock,
java.lang.Object item,
int index)
Remove the index "item" from the Map of beans. |
protected void |
beforeBlockProcessed(TagContext context,
Block currBlock,
java.lang.Object item,
int index)
Place the index "item" into the Map of beans. |
protected java.util.List<java.lang.String> |
getCollectionNames()
Returns the names of the Collections that are being used in
this ForTag. |
protected int |
getCollectionSize()
Returns the number of iterations. |
protected java.util.Iterator<java.lang.Integer> |
getLoopIterator()
Returns an Iterator that iterates over the desired values. |
java.lang.String |
getName()
Returns this Tag's name. |
protected int |
getNumIterations()
Returns the number of iterations. |
java.util.List<java.lang.String> |
getOptionalAttributes()
Returns the List of optional attribute names. |
java.util.List<java.lang.String> |
getRequiredAttributes()
Returns the List of required attribute names. |
void |
validateAttributes()
Validates the attributes for this Tag. |
| Methods inherited from class net.sf.jett.tag.BaseLoopTag |
|---|
getPastEndAction, process, setCollapsed, setCopyRight, setFixed, setGroupDirection, setOnLoopProcessed, setPastEndAction |
| Methods inherited from class net.sf.jett.tag.BaseTag |
|---|
checkAttributes, clearBlock, deleteBlock, getAttributes, getContext, getWorkbookContext, isBodiless, processTag, removeBlock, setAttributes, setBodiless, setContext, setWorkbookContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTR_VAR
public static final java.lang.String ATTR_START
public static final java.lang.String ATTR_END
public static final java.lang.String ATTR_STEP
| Constructor Detail |
|---|
public ForTag()
| Method Detail |
|---|
public java.lang.String getName()
Tag's name.
Tag's name.public java.util.List<java.lang.String> getRequiredAttributes()
List of required attribute names.
getRequiredAttributes in class BaseLoopTagList of required attribute names.public java.util.List<java.lang.String> getOptionalAttributes()
List of optional attribute names.
getOptionalAttributes in class BaseLoopTagList of optional attribute names.
public void validateAttributes()
throws TagParseException
Tag. The "start", "end",
and "step" attributes must evaluate to ints. If "step" is
not present, then it defaults to 1. The "step" must not be
zero. It is possible for no loops to be processed if "step" is positive
and "start" is greater than "end", or if "step" is negative and "start"
is less than "end".
validateAttributes in class BaseLoopTagTagParseException - If the attribute values are illegal or
unacceptable.protected java.util.List<java.lang.String> getCollectionNames()
Collections that are being used in
this ForTag.
getCollectionNames in class BaseLoopTagnull, no collections are being used.protected int getNumIterations()
ForTags.
getNumIterations in class BaseLoopTagprotected int getCollectionSize()
getCollectionSize in class BaseLoopTagprotected java.util.Iterator<java.lang.Integer> getLoopIterator()
Iterator that iterates over the desired values.
getLoopIterator in class BaseLoopTagIterator.
protected void beforeBlockProcessed(TagContext context,
Block currBlock,
java.lang.Object item,
int index)
Map of beans.
beforeBlockProcessed in class BaseLoopTagcontext - The TagContext.currBlock - The Block that is about to processed.item - The Object that resulted from the iterator.index - The iteration index (0-based).
protected void afterBlockProcessed(TagContext context,
Block currBlock,
java.lang.Object item,
int index)
Map of beans.
afterBlockProcessed in class BaseLoopTagcontext - The TagContext.index - The iteration index (0-based).item - The Object that resulted from the iterator.currBlock - The Block that was just processed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||