using errorhandler to display different component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

using errorhandler to display different component

NorbertHartl
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?

thanks,

Norbert

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: using errorhandler to display different component

Philippe Marschall
2007/7/26, Norbert Hartl <[hidden email]>:

> 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.

Cheers
Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: using errorhandler to display different component

NorbertHartl
On Fri, 2007-07-27 at 07:17 +0200, Philippe Marschall wrote:

> 2007/7/26, Norbert Hartl <[hidden email]>:
> > 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:)??
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
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: using errorhandler to display different component

Philippe Marschall
2007/7/27, Norbert Hartl <[hidden email]>:

> On Fri, 2007-07-27 at 07:17 +0200, Philippe Marschall wrote:
> > 2007/7/26, Norbert Hartl <[hidden email]>:
> > > 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
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: using errorhandler to display different component

NorbertHartl
On Fri, 2007-07-27 at 18:50 +0200, Philippe Marschall wrote:

> 2007/7/27, Norbert Hartl <[hidden email]>:
> > On Fri, 2007-07-27 at 07:17 +0200, Philippe Marschall wrote:
> > > 2007/7/26, Norbert Hartl <[hidden email]>:
> > > > 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

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside