struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Hatton" <chat...@qwest.net>
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:root>
  	<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>
   </nested:root>
--------------------------------------


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

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.

Thanks!
	Chris Hatton
	Tobin International



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Mime
View raw message