You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eino Lilius <el...@yahoo.co.uk> on 2004/10/15 08:16:29 UTC

component that loads it's html template

Hi all,

Is it possible to do a tapestry component that loads
it's html template from a file (or a database)?

I would like to use Tapestry tags in these html
templates, but I haven't managed to solve how to get
tapestry to process the Tapestry tags.

My guess is that the actual questions are:
"How can I tell the engine, that here is my html
template for this component?"

"Is it possible to change the html template on the
fly?"

Here is an example. The component writes an Insert
component, but the Insert is not "rendered", it
appears in the resulting html as: 
<span jwcid="@Insert" value="ognl:new
java.util.Date()\"/>

public class MyComponent extends AbstractComponent {
 
    protected void renderComponent(IMarkupWriter
pWriter, IRequestCycle pCycle)
{
        pWriter.printRaw("<span jwcid=\"@Insert\"
value=\"ognl:new java.util.Date()\"/>");
    }
 
}

Thanks for your help,
Eino


	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org