You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by phillip rhodes <rh...@yahoo.com> on 2004/12/02 05:47:03 UTC
Loading template from database- Solved?
Thanks for the earlier pointers. Here is what I
think would work. Please let me know if I am going
down the wrong path.
Write a subclass of AbstractEngine that overrides
getTemplateSource()
My getTemplateSource() will return my own subclass of
DefaultTemplateSource
In my subclass of DefaultTemplateSource, I will load
the templates from the database if that's where they
are, or call the default behavior in the super class.
Thanks for your time. I am doing this at night on my
own time. I hear that my employer might start to use
struts in our applications (Is my sarcasm coming
through?)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Loading template from database- Solved?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
You can also register an ITemplateSourceDelegate as an <extension>.
The DefaultTemplateSource pings the delegate if it cannot find a
template for the page/component being requested allowing you to hook in
to this mechanism without subclassing or overriding the engine. Look
at the documentation on the extensions to see the exact key and
details.
Erik
On Dec 1, 2004, at 11:47 PM, phillip rhodes wrote:
>
> Thanks for the earlier pointers. Here is what I
> think would work. Please let me know if I am going
> down the wrong path.
>
> Write a subclass of AbstractEngine that overrides
> getTemplateSource()
>
> My getTemplateSource() will return my own subclass of
> DefaultTemplateSource
>
> In my subclass of DefaultTemplateSource, I will load
> the templates from the database if that's where they
> are, or call the default behavior in the super class.
>
> Thanks for your time. I am doing this at night on my
> own time. I hear that my employer might start to use
> struts in our applications (Is my sarcasm coming
> through?)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org