Displaying a tree in jetspeed side navigation is a little trick. The problem is the velocity macro has no concept of local variable (pass by reference) so it is difficulty to keep track which layer/level you are now. I solved this problem with a stack to track the level. You can define the stack in the Jetspeed/WEB-INF/toolbox.xml with a session scope. You keep your current level number on the top of the stack. When you need to goto lower layer, you put the new level to the top of the stack. If you want to do indentation according to level, you peek your level from the stack. Stack has push, pop, and peek operation and it is handy.
Yiguang -----Original Message----- From: Stefano Bianchi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 8:05 AM To: Jetspeed Users List Subject: Re: Tree in a portlet A tree of what? Maybe you can use a jsp portlet... If you need an example, www.euroworksafe.org, click on Free Tour, then OntoSafeBrowser. It is a JSP/Servlet application shown through a IFramePortlet. Cheers, Stefano ----- Original Message ----- From: "Hans Brattberg" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Wednesday, July 12, 2006 2:01 PM Subject: Tree in a portlet > Hi! > I'm struggeling trying to have a dynamic tree structure in a portlet. > And I am realy not sure if I'm walking the rigth path. > > Is there anyone out there that has succeded in putting a tree structure in > a portlet? > What techs did u use? > > /Hans > > -- > Hans Brattberg > [EMAIL PROTECTED] > 070-575 31 32 > www.crisp.se > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
