[Seaside] using errorhandler to display different component

Norbert Hartl norbert at hartl.name
Mon Jul 30 14:08:14 UTC 2007


On Fri, 2007-07-27 at 18:50 +0200, Philippe Marschall wrote:
> 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.
> 
Thanks, it works quite well. I had to put asString to send to WAUrl. 

Norbert



More information about the Seaside mailing list