struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Hatton" <>
Subject Nested recursion does not recurse!
Date Tue, 17 Jun 2003 16:16:55 GMT
Hi, everyone,

Am I crazy?  I have been trying to get recursion to work using Arron's 
examples at keyboardmonkey and it absolutely will not recurse.  It just 
repeats the very first element.

Here's what I get displayed in my HTML results:
USA - productTree
ALABAMA - productTree.treeNodes[0]
ALABAMA - productTree.treeNodes[0]
ALABAMA - productTree.treeNodes[0]
ALABAMA - productTree.treeNodes[0]

Why is the same nested level repeated over and over?  Note: my Form class 
returns Object arrays (i.e. TreeNode[] getTreeNodes()).

Here's productNode.jsp:

<%@ taglib uri="/WEB-INF/tld/struts-nested.tld" prefix="nested" %>

  	<nested:write property="label" /> - <nested:writeNesting/><br> 	
	<nested:equal property="isExpanded" value="true"> 		<nested:iterate 
id="node" property="treeNodes"> 			<jsp:include page="productNode.jsp" /> 
		</nested:iterate> 	</nested:equal>

And the relevant code from product.jsp:
<nested:form action="" method="POST">
	<!-- Begin Product Tree -->
	<nested:nest property="productTree">
		<jsp:include page="../product/productNode.jsp"/>
	<!-- End Product Tree -->

I should note that I set isExpanded (i.e. "showChildren") to true for the 
very top-level element.  I do have other (non-nested) Struts tags included 
in this page outside the ProductTree code.

I'm on Tomcat 4.1.18, RedHat 8.0, Struts 1.1 rc2, jdk 1.3.1_07.

	Chris Hatton
	Tobin International

Using M2, Opera's revolutionary e-mail client:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message