s***@perficient.com
2006-12-14 22:43:59 UTC
WC v6.0
I'm using a wcbase:useBean tag within a <c:forEach> loop as follows:
<c:forEach var="item" items="somelist">
<wcbase:useBean id="test" classname="someCommerceClass">
<c:set value="${item.value}" property="someKey" target="${test}"/>
</wcbase:useBean>
Printed on screen: <c:out value="${test.data}"/>
</c:forEach>
Is it okay to use the <wcbase:useBean> within a loop or is there another way of accomplishing what intended above? The reason I ask is because what is printed on the screen is what was initialized during the first iteration only. It does not for the rest of the iterations.
I'm using a wcbase:useBean tag within a <c:forEach> loop as follows:
<c:forEach var="item" items="somelist">
<wcbase:useBean id="test" classname="someCommerceClass">
<c:set value="${item.value}" property="someKey" target="${test}"/>
</wcbase:useBean>
Printed on screen: <c:out value="${test.data}"/>
</c:forEach>
Is it okay to use the <wcbase:useBean> within a loop or is there another way of accomplishing what intended above? The reason I ask is because what is printed on the screen is what was initialized during the first iteration only. It does not for the rest of the iterations.