Configuring Siebel Business Applications > About Siebel Web Templates and Siebel Tags > About Siebel Tags >
About Iterator Tags
An iterator tag is a type of Siebel tag that defines the number of times the tag must iterate the contents of the iterator tag. For example, if you use the same HTML and Siebel tags with controls or page items that contain different values for the Id parameter, then you can use the following swe:for-each tag to reduce the size of the template files:
<swe:for-each count="x" iteratorName="yyyy" startValue="z"/>
You can use the following iterator tags:
The swe:for-each tag includes the following attributes:
- count. Specifies the number of times the swe:for-each tag must iterate the contents of the swe:for-each tag.
- startValue. The value assigned to the iterator at the start of the iteration. The tag assigns this value to the iterator to start the iteration. The tag increments the value by one for each iteration.
- iteratorName. The name of the iterator. You can use this name to get the value of the iterator during the iteration. You use the following format: swe:iteratorName.
Determining the Current Value of the Iterator
The name defined in the iteratorName attribute determines the current value of the iterator. The section that the swe:for-each tag encloses includes this name.
To determine the current value of the iterator
- For example, if you set the value of the iteratorName attribute to CurrentID, then you can use the following format to get the value of the iterator:
You can also use the swe:CurrentID+x tag to reference a value that is an increment over the current value. The following fragment illustrates this usage:
<swe:for-each startValue="2301" count="50" iteratorName="currentId">
<swe:control id="swe:currentId+100" />