Mr. Klute, Just as a quick answer: it can be done. :-) Unfortunately, I can't list my code, but I've attached a screenshot showing my TreeList implementation. Yes, you are correct in that your *component* hierarchies are statically defined in the spec. However, there are several features of Tapestry (namely the Foreach, Block, and InsertBlock components) that allow you to dynamically insert code into your page. The key is to define the hierarchy in a Java model object, then create the proper components to render it. Breaking it down, each element of a hierarchy is simply a 1-many relationship, which can be easily modelled with a Foreach. I'm particularly busy now, but feel free to e-mail me if you'd like some more details, and I'll get back to you as soon as I can. -jason
> Hi, > > I am new new to Tapestry, but an experienced Java architect and > J2EE developer. Browsing the Tapestry documentation and having > played around with my own first sample application, I cannot > find a way to dynamically create components and component > hierarchies. > > AFAIK the component hierarchies are nailed down statically in > the specification files. That is, each page and component knows from > the start which child component it contains.> > What about a complex hierarchy that is not yet know at > application start and changes while the program runs? As an > example, consider a deeply-nested directory tree. Each node in > the tree (directory, file, link etc.) should be visualized by a > suitable component. While the application runs, files are added to the > tree and others are deleted. For some files their> properties change. All this >should be reflected by the component that > displays the file tree. Each time it is redrawn it must> build up its immediate >child components. And the child > components displaying directories must rebuild their own > children. > > I don't see how this could be done with Tapestry. I'd be glad if I am > wrong and someone could show me the light.> > Best regards > Rainer Klute > > Rainer Klute IT-Consulting GmbH > Dipl.-Inform. > Rainer Klute E-Mail: [EMAIL PROTECTED] > K�rner Grund 24 Telefon: +49 172 2324824 > D-44143 Dortmund Telefax: +49 231 5349423 > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old cell > phone? Get a new here for FREE!> >https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Tapestry-developer mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/tapestry-developer
treeList.gif
Description: GIF image
