The <cat:iterateThroughView> tag iterates through a view of one Catalog item at a time until the end of the View is reached. If you do not specify a specific View (by index) through which to iterate, the current View of the ViewIterator is used. This tag does not reset the state of the ViewIterator upon completion.
<tagName attribute="value">
</tagName>
id
Required (String) - id="newInstance". The value of the current iterated object will be available in the variable name to which the id is assigned.
iterator
Required (ViewIterator) - Denotes a reference to a ViewIterator object that must be presented in the form <%= iteratorReference %>.
returnType
Optional (String) - returnType="returnType". Declares the type of the variable specified by the id attribute. Defaults to java.lang.Object.
viewIndex
Optional (Integer) - Specifies the index of the View (relative to the start of the ViewIterator) through which to iterate. The referenced object must be presented in the form <%= viewIndexIntegerReference %>.
This example displays the keys of all the ProductItems contained in the current View of a specified ViewIterator:
<cat:iterateThroughView iterator="<%= myIterator %>" id="item" returnType="com.beasys.commerce.ebusiness.catalog.ProductItem"> <%= item.getKey().toString() %> </cat:iterateThroughView>
This example displays the keys of all the ProductItems contained in the first View of a specified ViewIterator:
<cat:iterateThroughView iterator="<%= myIterator %>" id="item" returnType="com.beasys.commerce.ebusiness.catalog.ProductItem"viewIndex="new Integer(0)"> <%= item.getKey().toString() %> </cat:iterateThroughView>