[Seaside] using errorhandler to display different component

Philippe Marschall philippe.marschall at gmail.com
Fri Jul 27 16:50:38 UTC 2007


2007/7/27, Norbert Hartl <norbert at hartl.name>:
> On Fri, 2007-07-27 at 07:17 +0200, Philippe Marschall wrote:
> > 2007/7/26, Norbert Hartl <norbert at hartl.name>:
> > > Hi,
> > >
> > > I have a typical page layout of header, content and
> > > footer area. If an error occurs I like to display
> > > an error message in the content area without leaving
> > > the whole render loop. The further use of the web site
> > > does make sense as usually only one component is broken
> > > but everything else is working fine.
> > >
> > > I can't get anything to work to reenter the displayed
> > > component with the content area exchanged or to reenter
> > > the application on the error page to make further use
> > > possible.
> > >
> > > Until now I did [] on:do: error handling in the
> > > renderContentOn: and processCallbackStream: calls.
> > >
> > > Is this possible?
> >
> > I am aware of no way to do this that works out of the box other than
> > the one you described at the component level.
>
> That's ok. But now I have a problem that at the time an error
> occurrs the page is partially rendered already. Is there
> an easy way to force a reload of the page which is able to render
> to changed state (show:)??

Have you tried something like this:

on: Error
do: [
   self session redirectTo: (html urlForAction: [ self call:
ErrorComponent new ]) ]

You should be able to do this in the callback as well as ther rendering phase.

Philippe

> If there is no easy way would it be possible to generate a
> continuation url and redirect to it? If yes I would be very if
> you could point to some example. I saw that I can register a Block
> as a continuation but this will also operate on the component at
> the moment the error occurrs (the continuation is created), right?
>
> thanks,
>
> Norbert
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the Seaside mailing list