[Seaside] Callback onError: management

Dario Romano Trussardi dario.trussardi65 at gmail.com
Fri Jul 10 15:47:09 UTC 2020


Ciao Joachim,

	now everything is working fine,

	Considerations, explanations by the way?

	Thanks….

		Dario

> Am 10.07.20 um 17:24 schrieb Dario Romano Trussardi:
>> Ciao,
>> 
>> 	i do some test but i have not solved the problem.
>> 
>> 	Now i do some test adding some code to WAWelcome … application 	to check everything again and maybe share the problem...
>> 
>> 	With the last code reporting I have defined the following behaviors:
>> 
>> 		POINT A) When I generate the  error in the callback method, the system enters in the relative block
>> 
>> 				html jQuery ajax callback:[ [ self setupCashCartNominativeFor: aName ]
>> 					  on: Error do:[ self requestContext respond:[ :r | r internalError respond ]]];
>> 
>> 		POINT B)  The code:
>> 
>> 					 onError: ( script  << (  script jQuery: #genericErrorDialogId ) dialog open);
> 
> have you tried omitting "script <<" ?
> 
> 
> 
> Joachim
> 
> 
> 
> 
> 
>> 	
>> 					it is always activated even if no error is generated
>> 			
>> 					as if the ajax request always returned an error….
>> 
>> 
>> 	Thanks for considerations.
>> 		
>> 		Dario
>> 	
>>> Ciao,
>>> 
>>> 
>>>> 
>>>> Sorry, in my previous email I didn't notice the onSuccess: wasn't sent
>>>> to the right object
>>>> 
>>>> html anchor
>>>>   onClick: (
>>>>    (html jQuery ajax) callback: [
>>>>      [ self setupCashCartNominativeFor: aName ] on: Error do: [ self
>>>> requestContext respond: [ :r | r internalError respond ]
>>>>    ];
>>>>    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]]
>>> 
>>> 	following the above code I deduced the following code:
>>> 
>>>  		html anchor
>>>  			onClick:  ( html jQuery ajax script:[ :script |
>>> 					 script << html jQuery ajax callback:[ 
>>> 						[ self setupCashCartNominativeFor: aName ]
>> 
>> 								POINT A)	
>>>  							 on: Error do:[ self requestContext respond:[ :r | r internalError respond ]]];
>> 						
>>> 
>>>  			 	onError: ( script  << (  script jQuery: #genericErrorDialogId ) dialog open);
>> 	
>> 			POINT B)
>>>  				onSuccess:( script << (script jQuery: #idContentView) load html:[:h| self renderContentViewOn: h ])]);
>>> 			
>>> 				with:[ html div class: class; with:[ html paragraph: aName greaseString]]
>>> 
>>> ***
>>> 	With this code the onError :   (  script jQuery: #genericErrorDialogId ) dialog open)
>>> 		
>>> 		is open at any click even if the	 [ self setupCashCartNominativeFor: aName ] 	don’t signal error.
>>> 
>>> 	Thanks, 
>>> 
>>> 		Dario
>>> 
>>> 	P.S. In the method 		self setupCashCartNominativeFor: aName
>>> 
>>> 			when needed I signal error with a simple code :		  Error signal: ‘error' 
>> 
>> 
>> 
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org <mailto:seaside at lists.squeakfoundation.org>
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
> 
> -- 
> -----------------------------------------------------------------------
> Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de <mailto:jtuchel at objektfabrik.de>
> Fliederweg 1                         http://www.objektfabrik.de <http://www.objektfabrik.de/>
> D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com <http://joachimtuchel.wordpress.com/>
> Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20200710/f0dc8c0a/attachment-0001.html>


More information about the seaside mailing list