You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fernando Padilla <fe...@alum.mit.edu> on 2007/09/21 01:14:27 UTC
[T5] overriding PageRenderSupport
:)
I am trying to do the following in my AppModule, but it doesn't work. I
want to essentially remove the old "PageRenderSupport" entry in the
PageRenderInitializer configuration, and add my own. But I never see my
objects being created ( i put logging within them.. How that I
accomplish what I want to accomplish?? (on an aside, I would love to
make the render pipeline dependent on the content-type!)
public void contributePageRenderInitializer(
OrderedConfiguration<PageRenderCommand> configuration, final
SymbolSource symbolSource, final AssetSource assetSource ) {
configuration.add( "JsonPageRenderSupport", new PageRenderCommand() {
public void setup( Environment environment ) {
DocumentScriptBuilder builder = new FbmlDocumentScriptBuilderImpl();
environment.push( DocumentScriptBuilder.class, builder );
environment.push( PageRenderSupport.class, new
FbmlPageRenderSupportImpl( builder, symbolSource, assetSource ) );
}
public void cleanup( Environment environment ) {
environment.pop( PageRenderSupport.class );
Document document = environment.peek( Document.class );
DocumentScriptBuilder builder = environment.pop(
DocumentScriptBuilder.class );
builder.updateDocument( document );
}
} );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] overriding PageRenderSupport
Posted by Nick Westgate <ni...@key-planning.co.jp>.
I haven't got time to investigate this, but did you look into
Alias and AliasOverrides?
http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html
Cheers,
Nick.
Fernando Padilla wrote:
> :)
>
> I am trying to do the following in my AppModule, but it doesn't work. I
> want to essentially remove the old "PageRenderSupport" entry in the
> PageRenderInitializer configuration, and add my own. But I never see my
> objects being created ( i put logging within them.. How that I
> accomplish what I want to accomplish?? (on an aside, I would love to
> make the render pipeline dependent on the content-type!)
>
>
>
> public void contributePageRenderInitializer(
> OrderedConfiguration<PageRenderCommand> configuration, final
> SymbolSource symbolSource, final AssetSource assetSource ) {
> configuration.add( "JsonPageRenderSupport", new PageRenderCommand() {
> public void setup( Environment environment ) {
> DocumentScriptBuilder builder = new FbmlDocumentScriptBuilderImpl();
> environment.push( DocumentScriptBuilder.class, builder );
> environment.push( PageRenderSupport.class, new
> FbmlPageRenderSupportImpl( builder, symbolSource, assetSource ) );
> }
>
> public void cleanup( Environment environment ) {
> environment.pop( PageRenderSupport.class );
> Document document = environment.peek( Document.class );
> DocumentScriptBuilder builder = environment.pop(
> DocumentScriptBuilder.class );
> builder.updateDocument( document );
> }
> } );
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org