Scott Vickery wrote:
I am having a tough time getting my head around using tags in some
situations.
This works (the forms tag is part of common controls, and is not part of
the problem):
<logic:iterate name="configuration" id="ftr" indexId="ftrIdx">
<forms:row>
<forms:select width="100%">
<forms:label>
<c:out value="${ftr.key.ftrCode}"/>
</forms:label>
<c:forEach var="opt" items="${ftr.value}"><br>
<base:option key="${opt.optID}">
<c:out value="${opt.optCode}"/>
</base:option>
</c:forEach>
</forms:select>
</forms:row>
</logic:iterate>
But, if I replace the <c:forEach> with a <logic:iterate> like this:
<logic:iterate name="configuration" id="ftr" indexId="ftrIdx">
<forms:row>
<forms:select width="100%">
<forms:label>
<c:out value="${ftr.key.ftrCode}"/>
</forms:label>
<logic:iterate id="opt" property="${ftr.value}"><br>
<base:option key="${opt.optID}">
<c:out value="${opt.optCode}"/>
</base:option>
</logic:iterate>
</forms:select>
</forms:row>
</logic:iterate>
I get the error "Cannot find bean: "${ftr.value}" in any scope". Why?
In the inner iterate, I changed 'property' to 'collection' thinking that
would solve the problem, but, it did not. BTW, the reason I am using
the logic:iterate in the outer loop is for the indexId attribute.
What servlet container are you using -- or, more specifically, what
version of the servlet specification? It looks like the JSTL expression
isn't getting evaluated, which suggests you're using Servlet 2.3 or
earlier (I think). If you're using Servlet 2.4 check your web.xml has
the right preamble.
Also, for logic:iterate, you need to either use 'name' in conjunction
with 'property', or use 'collection'. You can't use 'property' alone.
Finally, c:forEach has equivalent functionality to the indexId
attribute; see c:forEach's varStatus attribute. So you probably don't
need to switch tags anyway.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]