On May 12, 2005, at 11:53 PM, Mark Dillon wrote:
Has anyone out there attempted to dynamically load a page template from the database at runtime? For instance, imagine I had a model property on a page specification, and that model had a string property containing template text. Would it be possible to render this as the page template (or component template for that matter)? I know this has been touched on by a few people, but I haven't found any solid examples for doing it. Just wanted to see if anyone had attempted this before re-inventing the proverbial wheel...
I have done prototype examples of this. The plumbing is in place. In Tapestry 3.0 (and surely 4.0 also) you can create an ITemplateSourceDelegate and register it as an <extension> in your .application file. Any time a template cannot be found in the web application where its supposed to be by default, it will ask your delegate for it.
This, in my opinion, is one of Tapestry's greatest (but relatively unknown) strengths!
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
