cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Baumgartner <mo...@gmx.de>
Subject Build a XML-Tree recursiv in XSP
Date Mon, 11 Aug 2003 09:53:08 GMT
Hello all,

I want to build dynamiclly a tree of nodes inside a xsp. I have tried 
something like this:


<tree id="navtree">
	<treeitem text="ExampleNode" />
	<xsp:logic>
		insertNode(anObject);
	</xsp:logic>

</tree>

<xsp:logic> 
	private void insertNode(Object obj){
</xsp:logic>
		<treeitem>
			<xsp:attribute name="text">text of Object </xsp:attribute>
		</treeitem>
		
<xsp:logic>
		// insert all children		
		for (int i= 0;i < obj.children.length; i++){
			insertNode(obj.children[i];		
		}
	}
</xsp:logic>


But this doesn't work. Is there an Workaround possible?

Thanks,
Marc



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message