|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.runtime.directive.Directive
org.apache.velocity.runtime.directive.Foreach
Foreach directive used for moving through arrays, or objects that provide an Iterator.
Field Summary | |
---|---|
private int |
counterInitialValue
What value to start the loop counter at. |
private java.lang.String |
counterName
The name of the variable to use when placing the counter value into the context. |
private java.lang.String |
elementKey
The reference name used to access each of the elements in the list object. |
protected Info |
uberInfo
immutable, so create in init |
Fields inherited from class org.apache.velocity.runtime.directive.Directive |
---|
rsvc |
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants |
---|
BLOCK, LINE |
Constructor Summary | |
---|---|
Foreach()
|
Method Summary | |
---|---|
java.lang.String |
getName()
Return name of this directive. |
int |
getType()
Return type of this directive. |
void |
init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - init the tree and get the elementKey from the AST |
boolean |
render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
renders the #foreach() block |
Methods inherited from class org.apache.velocity.runtime.directive.Directive |
---|
getColumn, getLine, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String counterName
private int counterInitialValue
private java.lang.String elementKey
protected Info uberInfo
Constructor Detail |
public Foreach()
Method Detail |
public java.lang.String getName()
getName
in class Directive
public int getType()
getType
in class Directive
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws java.lang.Exception
init
in class Directive
java.lang.Exception
public boolean render(InternalContextAdapter context, java.io.Writer writer, Node node) throws java.io.IOException, MethodInvocationException, ResourceNotFoundException, ParseErrorException
render
in class Directive
java.io.IOException
MethodInvocationException
ResourceNotFoundException
ParseErrorException
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |