That's close to my opinion. I appreciate how people would like to create a new component on the fly, and I understand the use cases involving that.
However, it goes against the grain of Tapestry. I've finally documented this, the concept of static structure and dynamic behavior. Once you allow "some" pages to have a different structure but the same name, much of what Tapestry is capable of doing is thrown away. It can't cache effectively, it can't operate in a cluster effectively. There's so much going on in the design that says "if I know the page name, I can trust that the structure is identical" even when its a different page instance and a different server in the cluster. I think it's very important that Tapestry store as little as possible in the session. The new in T5 redirect-after-action pattern does force you to store more data in the session (with huge benefits, and the option to store on the client instead) so there's a bit of a compromise going on. However, doing as Wicket and JSF and storing big chunks of page structure in the session (necessary to support runtime dynamic page structure) is something I'm fundamentally opposed to, given that there are quite satisfactory solutions, based on blocks and other structures. On 8/17/07, Mark Stang <[EMAIL PROTECTED]> wrote: > In the past, and I haven't heard anything from Howard to make me think > differently, this was not possible. > > Howard's view has been that there is no need to create a component on the > fly. Instead the standard procedure is to embed it in a page and hide it > until needed. > > hth. > > Mark J. Stang > Software Engineer > office: +1 303.468.2900 > Ping Identity > > > > -----Original Message----- > From: David Avenante [mailto:[EMAIL PROTECTED] > Sent: Fri 8/17/2007 10:29 AM > To: Tapestry users > Subject: Re: [T5] instantiate a component on the fly > > Hum I not sure. > > My component is not define in class and is not define in the template => > It's a really a NEW component. > > So as I can see there is a possibility with > PageElementFactory.newComponentElement(....) that I can inject in my page. > > But there is too many parameters. I hope Tapestry give me a day a very > simplistic way to do this. > > I continue my investigations. > > Thanks for the input Robert ;) > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]