Instead of creating a new kind of PageSource service and injecting it into the
infrastructure, you should replace the original PageSource service by your own
implementation:
<implementation service-id="tapestry.page.PageSource">
<invoke-factory>
<construct class="com.acme.MyVeryOwnPageSourceImplementation">
<set-service property="pool" service-id="PagePool"/>
<set-service property="pageSpecificationResolver"
service-id="tapestry.page.PageSpecificationResolver"/>
<set-service property="loader" service-id="tapestry.page.PageLoader"/>
</construct>
</invoke-factory>
</implementation>
Note the <implementation> tag instead of a <service-point> tag. This allows you
to replace existing service implementations by your own.
Raphael
> -----Original Message-----
> From: Jeff Lubetkin [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 10, 2005 7:02 PM
> To: Tapestry users
> Subject: Providing my own PageSource implementation in Tapestry 4.0
>
> My current project has a need to allow single page templates to be
> changed without restarting the server or resetting the entire
> application. I want to use Tapestry 4.0 for this, and I thought I had
> figured out a way to do what I need to do. However, my way of doing it
> will require providing my own IPageSource and ITemplateSource
> implementations. When I try to provide my own PageSource to the
> tapestry.Infrastructure configuration, I get an exception:
>
>
>
> Error at
> jar:file:/C:/Documents%20and%20Settings/jefflub/.m2/repository/tapestry/
> tapestry/4.0-beta-3/tapestry-4.0-beta-3.jar!/META-INF/tapestry.page.xml,
> line 226, column 62: Infrastructure contribution for property
> 'pageSource' (mode 'null') conflicts with a prior contribution (at
> context:/WEB-INF/hivemodule.xml, line 95, column 71) and has been
> ignored.
>
>
>
> I see three possible ways out of this:
>
> 1) Has anyone else come up with a solution to hot-reloading a single
> page template on the fly?
>
> 2) Is there another way to provide PageSource and TemplateSource
> implementations?
>
> 3) Is there a way to replace the StrictErrorHandler in
> ApplicationServlet with DefaultErrorHandler so that this error doesn't
> throw? According to the error message this should be recoverable.
>
>
>
> Thanks,
>
> jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]