FOREACH |
Performs a loop operation. |
%<FOREACH var in list>%
...
%</FOREACH>%
|
Parameters you can use with this operator are:
- var. The temporary variable for storing the Java object. The parameter can be any value, but must be the same as name of variable in the following operation.
- list. The name of the Java object, which is preset into template context before invoking the FOREACH operator.
|
%<FOREACH fileRecObj in fileRecordList>%
The send id is: %fileRecObj. getSenderID()%
%</FOREACH>%
The send ID of the FileRecord instance in the fileReocrdList is the output. |
IF |
Performs a conditional operation. |
%<IF var >%
...
%</IF>%
|
The var parameter is the name of a variable that is preset into template context before invoking the IF operator. |
%<IF outputFlag>%
The value of flag is true
%</IF>%
If the value of outputFlag is true, then the following statement is written to the file: The value of flag is true. |
INCLUDE |
Includes other template files in the current template file. |
%<INCLUDE>%
...
%</ INCLUDE>%
|
None |
%<INCLUDE>%
D:\template\templateB.xml
"%</INCLUDE>%
The context of the templateB.xml file is included in the parent template. |