Callback onError: management

Dario Romano Trussardi <[email protected]> Thu, 9 Jul 2020 17:41:00 +0200
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
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