You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Krygowski <ja...@shaws.com> on 2002/12/13 16:51:09 UTC
Page scope bean and nested:iterate
Hi-
I'm using nested:iterate and have not been successful in using the id
attribute of the iterate tag. The documentation for nested:iterate is just
the documentation for logic:iterate so I would imagine that nested:iterate
should support id.
I have some code like where theBean is the source of the objects I'm
iterating over:
<nested:iterate id="element" indexId="currentIndex" property="theBean">
<logic:present name="element">
<%=element.hashCode()%><br>
</logic:present>
<nested:write property="name"/><br>
<%=currentIndex.intValue()%>
</nested:iterate>
The following code runs and outputs just the value of the name and the
current index number. If I removed the logic:present, I get a runtime error
because element is null. I think this should work, but it doesn't. Why?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>