struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Krygowski <james.krygow...@shaws.com>
Subject Page scope bean and nested:iterate
Date Fri, 13 Dec 2002 15:51:09 GMT
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:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message