[Seaside] add parameter to settings onAjaxError/ajaxErrorHandler

Sabine Manaa manaa.sabine at gmail.com
Sat Feb 11 11:25:31 UTC 2017


Hi Johan,

thank you for your answer! (I saw that you answered Joachims very
interesting question and was hoping that you would come to mine, too, and,
yeah, I have an answer :-))

I tried it with a simple example and can reproduce it.

Unfortunately, my case has one more problem/step where I ask you for help. 

The situation is: My user decided to delete its account by click on a
button. Then I delete the user from database, remove his session and
transfer him to a page where I ask for the reason why he wants to leave (I
hope this will be needed never haha). In this situation, there is no session
anymore and normally, my error handler dialog (onAjaxError) would pop up
("There is no session, please log in again bla bla").

I do it as suggested by you:
onClick:
	(html jQuery ajax
		optionAt: 'supressErrors' put: 'true';
		script: [ :script | 
			"delete user, session etc "
			script << (script jQuery id: self pageID) replaceWith: [ :h |
RKADeletedAccountView new renderContentOn: h ] ]);
with: 'Ja'.

If I would not transfer the user to the RKADeletedAccountView but would stay
at the current page, the supressErrors variable would be available.

But within the RKADeletedAccountView, the variable is not visible. Is there
a way to have this information also in the new rendered
RKADeletedAccountView/avoid that the Ajax error handler pops up? 

(BTW: I render the RKADeletedAccountView within the existing html head by
replacing my node "pageID" by the form for requesting the info from the
user. So, I save loading all css etc head stuff again, this is how my whole
application works. If there is no other alternative, I think I could also
load all and do not register the error handler. But having the 
"supressErrors" solution seems to be smarter to me.) 

Regards 
Sabine





--
View this message in context: http://forum.world.st/add-parameter-to-settings-onAjaxError-ajaxErrorHandler-tp4933109p4933917.html
Sent from the Seaside General mailing list archive at Nabble.com.


More information about the seaside mailing list