public class ForEach extends AbstractAction
| Constructor and Description |
|---|
ForEach() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBegin()
Returns the index of the item at which the iteration begins.
|
int |
getEnd()
Returns the index of the item at which the iteration ends (inclusive).
|
Object |
getItems()
Returns the attribute items.
|
String |
getVar()
Returns the variable name used to iterate thru items.
|
String |
getVarStatus()
Returns the variable name used to hold the current iteration
status, an instance of
LoopStatus. |
boolean |
isTrim()
Returns whether to trim the result.
|
void |
render(ActionContext ac,
boolean nested)
Processes the action and renders the output to
ActionContext.getOut(). |
void |
setBegin(int beg)
Sets the index of the item at which the iteration begins.
|
void |
setEnd(int end)
Sets the index of the item at which the iteration ends (inclusive).
|
void |
setItems(Object items)
Sets the attribute items.
|
void |
setTrim(boolean trim)
Sets whether to trim the result.
|
void |
setVar(String var)
Sets the variable name used to iterate thru items.
|
void |
setVarStatus(String varStatus)
Sets the variable name used to hold the current iteration status.
|
String |
toString() |
append, append, append, getIf, getUnless, isEffective, setIf, setUnless, toScopepublic String getVar()
public void setVar(String var)
public String getVarStatus()
LoopStatus.public void setVarStatus(String varStatus)
public Object getItems()
public void setItems(Object items)
public int getBegin()
public void setBegin(int beg)
Default: 0.
public int getEnd()
public void setEnd(int end)
Default: Integer.MAX_VALUE.
public boolean isTrim()
public void setTrim(boolean trim)
Default: true.
public void render(ActionContext ac, boolean nested) throws DspException, IOException
ActionActionContext.getOut().nested - whether there is any nested content.DspExceptionIOExceptionCopyright © 2021. All rights reserved.