You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Fernando Padilla <fe...@alum.mit.edu> on 2007/09/19 18:22:29 UTC

[T5] overriding PageResponseRenderer

I need to figure out how to override the default PageResponseRenderer. 
I just tried to bind my own PageResponseRenderer, but that seems to 
clash with the default one.  What's the proper way of overriding the 
default Tapestry service bindings?






I tried to do the following in my AppModule:

public static void bind( ServiceBinder binder ) {
binder.bind( PageResponseRenderer.class, 
JsonPageResponseRendererImpl.class );
}


But when I ran it I got this exception:

2007-09-19 09:17:05,113 [main] ERROR 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/fancity] 
- Exception starting filter app
java.lang.RuntimeException: Service id 'PageResponseRenderer' has 
already been defined by 
org.apache.tapestry.internal.services.PageResponseRendererImpl(MarkupWriterFactory, 
PageMarkupRenderer, MetaDataLocator) (at 
PageResponseRendererImpl.java:41) and may not be redefined by 
com.protrade.fandom.site.components.json.JsonPageResponseRendererImpl(MarkupWriterFactory, 
PageMarkupRenderer, MetaDataLocator, Environment) (at 
JsonPageResponseRendererImpl.java:35). You should rename one of the 
service builder methods.
         at 
org.apache.tapestry.ioc.internal.RegistryImpl.<init>(RegistryImpl.java:146)
         at 
org.apache.tapestry.ioc.RegistryBuilder.build(RegistryBuilder.java:132)
.....


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


Re: [T5] overriding PageResponseRenderer

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Check out Alias and AliasOverrides:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html

Also search the users list for previous override discussions.

Cheers,
Nick.


Fernando Padilla wrote:
> I need to figure out how to override the default PageResponseRenderer. I 
> just tried to bind my own PageResponseRenderer, but that seems to clash 
> with the default one.  What's the proper way of overriding the default 
> Tapestry service bindings?
> 
> 
> 
> 
> 
> 
> I tried to do the following in my AppModule:
> 
> public static void bind( ServiceBinder binder ) {
> binder.bind( PageResponseRenderer.class, 
> JsonPageResponseRendererImpl.class );
> }
> 
> 
> But when I ran it I got this exception:
> 
> 2007-09-19 09:17:05,113 [main] ERROR 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/fancity] 
> - Exception starting filter app
> java.lang.RuntimeException: Service id 'PageResponseRenderer' has 
> already been defined by 
> org.apache.tapestry.internal.services.PageResponseRendererImpl(MarkupWriterFactory, 
> PageMarkupRenderer, MetaDataLocator) (at 
> PageResponseRendererImpl.java:41) and may not be redefined by 
> com.protrade.fandom.site.components.json.JsonPageResponseRendererImpl(MarkupWriterFactory, 
> PageMarkupRenderer, MetaDataLocator, Environment) (at 
> JsonPageResponseRendererImpl.java:35). You should rename one of the 
> service builder methods.
>         at 
> org.apache.tapestry.ioc.internal.RegistryImpl.<init>(RegistryImpl.java:146)
>         at 
> org.apache.tapestry.ioc.RegistryBuilder.build(RegistryBuilder.java:132)
> .....
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
> 
> 

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


Re: [T5] overriding PageResponseRenderer

Posted by Jesse Kuhnert <jk...@gmail.com>.
I resisted reminding you last time because of the mit address,  but
you do know that this list is for discussions on development ~of~
Tapestry itself don't you?

Discussions are good,  just make sure they are about the framework and
not how to use it or other similar questions that belong on the users
list.

On 9/19/07, Fernando Padilla <fe...@alum.mit.edu> wrote:
> I need to figure out how to override the default PageResponseRenderer.
> I just tried to bind my own PageResponseRenderer, but that seems to
> clash with the default one.  What's the proper way of overriding the
> default Tapestry service bindings?
>
>
>
>
>
>
> I tried to do the following in my AppModule:
>
> public static void bind( ServiceBinder binder ) {
> binder.bind( PageResponseRenderer.class,
> JsonPageResponseRendererImpl.class );
> }
>
>
> But when I ran it I got this exception:
>
> 2007-09-19 09:17:05,113 [main] ERROR
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/fancity]
> - Exception starting filter app
> java.lang.RuntimeException: Service id 'PageResponseRenderer' has
> already been defined by
> org.apache.tapestry.internal.services.PageResponseRendererImpl(MarkupWriterFactory,
> PageMarkupRenderer, MetaDataLocator) (at
> PageResponseRendererImpl.java:41) and may not be redefined by
> com.protrade.fandom.site.components.json.JsonPageResponseRendererImpl(MarkupWriterFactory,
> PageMarkupRenderer, MetaDataLocator, Environment) (at
> JsonPageResponseRendererImpl.java:35). You should rename one of the
> service builder methods.
>          at
> org.apache.tapestry.ioc.internal.RegistryImpl.<init>(RegistryImpl.java:146)
>          at
> org.apache.tapestry.ioc.RegistryBuilder.build(RegistryBuilder.java:132)
> .....
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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