[Seaside] Callback onError: management

Esteban Maringolo emaringolo at gmail.com
Thu Jul 9 15:55:29 UTC 2020


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
<dario.trussardi65 at gmail.com> 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
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list