Hi Kent,
Using your solution, if the template (extracted from the database) contains
a tapestry component, it will not be interpreted.
For example:
...(html tags)...
<span jwcid="@MyComponent" />
...(html tags)...
Am I right?
Didier
-----Message d'origine-----
De : news [mailto:[EMAIL PROTECTED] De la part de Kent Tong
Envoyé : Saturday, October 29, 2005 4:50 AM
À : [email protected]
Objet : Re: Is it possible to save an html template outside the application
?
Didier Frund <didier.frund <at> gmail.com> writes:
> My question is: Is it possible to save an html template outside the
tapestry
> application?
It is difficult but possible. In your .jwc file:
<component ...>
<asset name="$template" path="db:someId"/>
</component>
Make a contribute like:
<contribution configuration-id="tapestry.assets.AssetFactories">
<factory prefix="db" object="service:DBAssetFactory"/>
</contribution>
Define a DBAssetFactory Hivemind service yourself implementing the
AssetFactory interface to create a DBAsset object from a given id
("someId"). Define a DBAset class implementing IAsset reading the
DB with that id and returning the bytes.
--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]