Now when we want to report on several objects, we have create loop for each object in the list. For this task paired “for” directive is being used. Paired – means, one container for opening, another container for closing.
Remember example from Conditional Sections chapter. We will modify it to report all the customer names, from all selected partners.
<for each="one_partner in objects"> <if test="one_partner.customer"> <one_partner.name> </if> </for>
Please notice paired for directive with embedded conditional, if directive inside. Variable one_partner has been introduced, to hold temporary reference to each partner in objects list.