Overriding a service is described at
http://jakarta.apache.org/hivemind/override.html
Here's an example for your case:
<implementation service-id="tacos.AjaxExceptionPresenter">
<invoke-factory>
<construct class="net.sf.tacos.ajax.impl.AjaxExceptionPresenter">
<set property="exceptionPageName" value="CustomPage"/>
<set-object property="ajaxWebRequest"
value="service:tacos.AjaxWebRequest"/>
<set property="writeCause" value="true"/>
</construct>
</invoke-factory>
</implementation>
It provides a 'CustomPage' to be displayed on ajax exceptions. If that's
all you need, you don't have to create a custom ExceptionPresenter subclass.
Do the same for 'tacos.AjaxStaleSessionExceptionPresenter'
Additionally, I plan to add an even simpler way for specifying these pages.
Something like:
<contribution configuration-id="tapestry.InfrastructureOverrides">
<property name="tacos.exceptionPageName" value="CustomPage1"/>
<property name="tacos.staleSessionPageName" value="CustomPage2"/>
</contribution>
This will probably make it into tacos4.0.1
>From Marcos Chicote <[EMAIL PROTECTED]>:
> Thanks for the answer Andy
>
> I made my own version of AjaxStaleSession and put it in a package in my app
> called net.sf.tacos.ajax.pages.copy.
> After that, I tried two different options: I tried typing the following text
> in my hivemodule.xml and I tried opening tacos jar and putting it in taco's
> hivemodule, but none worked.
>
> <service-point id="AjaxExceptionPresenter"
> interface="org.apache.tapestry.error.ExceptionPresenter">
>
> Handler for uncaught exceptions inside the ajax request
> processing code path; the default implementation
> displays the exception page to report the
> exception.
>
> <invoke-factory>
> <construct
> class="net.sf.tacos.ajax.impl.AjaxExceptionPresenter">
> <set property="exceptionPageName"
> value="tacos:/net/sf/tacos/ajax/pages/AjaxException"/>
> <set-object property="ajaxWebRequest"
> value="service:tacos.AjaxWebRequest"/>
> </construct>
> </invoke-factory>
>
> </service-point>
>
> <service-point id="AjaxStaleSessionExceptionPresenter"
> interface="org.apache.tapestry.error.ExceptionPresenter">
>
> Handler for StaleSessionExceptions, which indicate that
> the session has expired between the time a link or form
> was rendered, and the time it was triggered in a new ajax request.
> <invoke-factory>
> <construct
> class="net.sf.tacos.ajax.impl.AjaxExceptionPresenter">
> <set property="exceptionPageName"
> value="/net/sf/tacos/ajax/pages/copy/AjaxStaleSession"/>
> <set-object property="ajaxWebRequest"
> value="service:tacos.AjaxWebRequest"/>
> <set property="writeCause" value="false"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> Am i doing something wrong?
>
> I read the link that you sent me, but couldn't solve the problem.
>
> Thanks for everything
>
> Marcos.
>
> ----- Original Message -----
> From: "andyhot" <[EMAIL PROTECTED]>
> To: "Tacos Developers" <[email protected]>
> Sent: Wednesday, September 13, 2006 1:04 PM
> Subject: Re: [Tacos-devel] How can i overwrite tacos StaleSession?
>
>
> > Marcos Chicote wrote:
> > > Hi!
> > > I have successfully overwritten Tapestry's StaleSession page. However,
> when session expires and i use a tacos component, the default StaleSession
> page apears. How can I overwrite it?
> > >
> > There are 2 service points you'll have to override.
> >
> > tacos.AjaxExceptionPresenter
> > tacos.AjaxStaleSessionExceptionPresenter
> >
> > See
> > http://thread.gmane.org/gmane.comp.java.tacos.devel/1381/focus=1408
> >
> >
> > > Thanks
> > >
> > > Marcos
> > >
> > > ------------------------------------------------------------------------
> > >
> >
> > -------------------------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Tacos-devel mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > >
> >
> >
> > --
> > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> > Tapestry / Tacos developer
> > Open Source / J2EE Consulting
> >
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Tacos-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/tacos-devel
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Tacos-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
>
--
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel