I may be way off track, but adding recursive component support to print out a menu or a tree seems like a big overkill.
I have some hazy idea how this should be implemented: in both cases we have a model with all the data we need, a way to reuse single component (ActionLink) which would generate events with an "id" extracted from current data element... sth like cell renderers in swing. ActionLink like this would always call same listener but with extra data (id) On 5/3/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
I was just thinking about some of this on the way in. If you @Inject the ServiceResources into your Tree component, you can ask it to generate action links for you. Handy! On 5/3/07, Francois Armand <[EMAIL PROTECTED]> wrote: > > Le jeudi 03 mai 2007 à 10:27 +0200, Francois Armand a écrit : > > Hello everybody, > > > So, my question is : is there a way of implementing recursive > > component ? If not, is there an existing component implementing a > > non-recursive tree walk ? And if not, have you some advices about doing > > such a component in T5 (say I know an algorithm for non-recursive tree > > walk, what are the best practice in T5 ?) > > > > Ok, I found that : > http://tapestry.apache.org/tapestry5/tapestry-core/guide/dom.html and I > can render my tree with ul/li tags thanks to MarkupWriter. > > But now, I want to add "actionlink" around each node content (the string > enclosed by <li> tags). How can I do that ? I think I can copy the code > from ActionLink, but perhaps there is a better method (well... Now that > I begin to play with MarkupWriter, I certainly have to use it for > everything...). > > Any advice would be appreciated :) > > Francois > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com