You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Butler <cb...@mateso.com> on 2003/03/13 19:33:26 UTC

nested:iterate & jsp:include, nesting reference incorrect?

In my http request scope, I'm seeing <nested-includes-key/> losing my
iterate index when passing the nesting context to an included jsp. I've
been using struts-1.1RC1.  I've dumped out the request attributes, pre
and post jsp include to see what's in there...

*** external.jsp
<nested:iterate property=someObjects>
  <nested:writeNesting />
  <jsp:include page="included.jsp />
</nested:iterate>

*** included.jsp
<nested:root>
  <nested:writeNesting />
</nested:root>

In this example, I would get a nesting of:
In the external jsp:
someObject[0]
someObject[1]

In the included jsp:
someObject[0]
someObject[0]


Within any one jsp, the nested iterate seems to manage things just fine,
including collections in an included jsp, just not the nested:root of
the included jsp.

Also, I notice that the NestedReference.getNestedProperty() appears to
yield the correct string *prior* to setting the <nested:root> and it is
set to an empty string (or null?) immediately afterwards.  Thus it
appears that the setting of <nested:root> is either where the bug is, or
this is desired behavior...  or I've gotten this entirely wrong. :-)

chris

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org