Re: Callback onError: management

Esteban Maringolo <[email protected]> Thu, 9 Jul 2020 12:55:29 -0300
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CAJMgPCJbCgLD8gobm4oOrveEk7OCSicoCE1wfkSNcw1KEgpZsQ@mail.gmail.com>
Ciao Dario,

You must force the return of an HTTP error response.

on: Error do:[  self requestContext respond:[ :r | r internalError respond ] ]

Regards!

Esteban A. Maringolo

On Thu, Jul 9, 2020 at 12:41 PM Dario Romano Trussardi
<[email protected]> wrote:
>
> Ciao,
>
> i development with Seaside 3.3 into Pharo 703.
>
> I have an anchor with specific ajax callback:   block.
> Now I’m interested to rendering different data if the callback code erase some error or not.
> I do some test with this code but the onError: script data is always rendering.
>
>
> renderSubTableAnchorFor: aName class: class on: html
>
> html anchor
> onClick:( html jQuery script:[ :script |
> script << html jQuery ajax
> callback:[ [ self setupCashCartNominativeFor: aName ] ā€œ it can generate error ā€œ
> on: Error do:[ self requestContext respond:[ :r | ā€œ ???? " ] ]];
>
> onError:( script <<( script jQuery: #genericErrorDialogId ) dialog open );
> onSuccess:( script << (script jQuery: #idContentView) load html:[:h| self renderContentViewOn: h ])]);
>
> with:[ html div class: class;
> with:[ html paragraph: aName greaseString]]
>
>
> Forget something !?
>
> Some considerations ?
>
> Thanks,
>
> Dario
> _______________________________________________
> seaside mailing list
> [email protected]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside