struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sloan Seaman" <>
Subject Nested Tag
Date Tue, 01 Jul 2003 15:21:48 GMT
I'm trying to do a tree using the nested tags and I'm having some issues.

I've got a NodeBean (like the TreeBean in the monkey bean example) with the following:
 public NodeBean() {
  NodeBean n1 = new NodeBean("1", "1");
  NodeBean n2 = new NodeBean("2", "2");
  NodeBean n3 = new NodeBean("3", "3");
  NodeBean n4 = new NodeBean("4", "4");

And my .jsp looks like:
<nested:form action="/">
 <jsp:include page="treeNode.jsp"/>

and (treeNode.jsp):
 <nested:iterate property="children">
  <DD><FONT size="-2">
  <nested:write property="ancestry">
   <jsp:include page="treeNode.jsp"/>

But the output I get is:
  1 children[0] 
    3 children[0].children[0] 
  2 children[1] 
    3 children[0].children[0] 

You can see that node 2 is showing a the child of node 1 when it should (as in the java code)
clearly be node 4.

Can anyone help me as to why this is happenning?  Is it a bug in the nested tag?


This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message