It looks like Tapestry really doesn’t like not having components declared at deployment-time. So, we have had to declare all views in one template file and based on a whether a view has been selected that component skips its pageBeginRender method. Otherwise, all components go through a pageBeginRender process, even though they are not being actually rendered. The framework doesn't seem to care.
I cannot believe that the framework doesn't allow adding components to a page during run-time. I find that very inflexible. We have to be able to support "actions" from a navigation tree on the left and build these actions as tabbed views on the right main content. So, how do you suppose this can be done without declaring all possible view components in the right content template? Thanks, Ozzie G -----Original Message----- From: news [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 6:11 AM To: [email protected] Subject: Re: Programmatically adding a component to a page at runtim There were a few threads about this. You should not do this, because pages should be static. According to Howard, this might work in a developing enviourenment. On Production you will get problems, because of how Tapestry Caches pages. There are two alternatives. Either use conditional rendering (@Conditional) or delegate the rendering to a java class: instead of adding a component, your component calls a render method on an custom class, passing the writer... Cheers, Ron ציטוט [EMAIL PROTECTED]: > I would like to be able to add (switch out) components to a page during > runtime. I have seen a few examples on the web, however, they fall short in > binding persistent properties of the newly added component. After examining > the PageLoader class, it looks like most of the methods are private or > protected and don't allow one to mimick its operation programmatically. Is > there anyone out there who has successfully added a component during runtime > to a page and gotten the persistent properties to work? This seems to me > like a very important feature missing from the framework, unless I am > totally missing it. > > > > Thanks, > > Ozzie Gurkan > > Integrated Systems Manager > > Emerson Retail Services > > Tel: 678-631-1925 > > e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
