You might want to look at the JSP .tag file support. I've used it for similar requirements before. (*Chris*)
On Mon, May 23, 2011 at 2:12 PM, Jason Pyeron <jpye...@pdinc.us> wrote: > > -----Original Message----- > > From: Jason Pyeron > > Sent: Monday, May 23, 2011 16:52 > > To: 'Struts Users Mailing List' > > Subject: Iterating over a tree structure > > > > I have been racking my brains out today on this one. > > > > What is the best way to perform a depth first traversal of a > > tree data structure (in the view). > > > > Ex: maps of maps of ... OR lists of lists of lists of ... > > > > > To clarify, I am not looking to render a tree widget, but rather something > like > this: > > <ol> > <li><s:a action="dashboard">Home</s:a></li> > <li>Admin > <ol> > <li>Users > <ol> > <li><s:a action="user-crud">user-crud</s:a></li> > <li><s:a action="users-mgmt">users-mgmt</s:a></li> > </ol> > </li> > <li>Rules<ol> > <li><s:a action="rules-mgmt">rules-mgmt</s:a></li> > <li><s:a action="rule-crud">rule-crud</s:a></li> > <li><s:a action="rule-crud" method="test">rule-crud!test</s:a></li> > </ol></li> > <li>Reports > <ol> > <li><s:a action="reports-mgmt">reports-mgmt</s:a></li> > <li><s:a action="report-crud">report-crud</s:a></li> > </ol> > </li> > </ol> > </li> > <li>Reports > <ol> > <li><s:a action="initiation">Initiate</s:a></li> > <li><s:a action="update">Update</s:a></li> > <%-- <li><s:a action="generate-report" >generate-report</s:a> same as > preview > </li> --%> > <li><s:a action="generate-report" method="preview">Preview</s:a></li> > <li><s:a action="generate-report" method="run">Publish</s:a></li> > </ol> > </li> > <li><s:a action="search">search</s:a></li> > <li>Help > <ol> > <li><s:a action="index!docs">Manual</s:a></li> > <li><s:a action="index!support">Support</s:a></li> > <li><s:a action="index">About</s:a></li> > </ol> > </li> > </ol> > > > > > > -Jason > > > > > -- > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > - - > - Jason Pyeron PD Inc. http://www.pdinc.us - > - Principal Consultant 10 West 24th Street #100 - > - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - > - - > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > This message is copyright PD Inc, subject to license 20080407P00. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >