[Seaside] Handling expired Session in Seaside 3.0

dtrussardi at tiscali.it dtrussardi at tiscali.it
Fri Apr 13 09:39:10 UTC 2012


	sorry for the replication, i hope to be more clear and concise.

	I do some test to manage the request relative to one expired session.

	My goal is to redirect to a specific  url    when the user click any component relative to one expired session.

	The solution to keep alive the session with:

	 	(html scriptaculous periodical
      			 interval: 30 seconds;
			callback:[:x| self transcript] )).

	don't complete solve the problem because for some situation this periodical update can may be lost

	and the user can click on component relative to  one expired session in some cases.

	I create a WAApplication  subclass for  define the 	handleExpired: aRequestContext      method.

	Now it's set :

		handleExpired: aRequestContext
			" redirect all expire request to a specific url"
			aRequestContext redirectTo: anUrl

	This intercept all activity relative to one expired session  and redirect to a specific anUrl.

	The problem is relative to component with  ajax html updater   definition.

	For example;
		.......  onChange: (		
			html updater
					id: 'elementToUpdate';
					triggerFormElement: id;
					callback: [:r | rfrMasterHtml updateView: r]	

		because when the session is expired and  the user trigger the onChange, 
		the application	 handlerExpired:	 intercept the request, but the		 aRequestContext redirectTo: url  

	 	don't update the html page but is rendering in the html DIV 
		relative to html updater  statement   ( 'elementToUpdate' in this case ).

	Question for action relative to one expired session :
		A) for onChange trigger  i can rendering the 		aRequestContext redirectTo: anUrl  	at  the top of the page

		B) if i lose completely the internet connection i can display a message to the user.

	Thanks for any consideration,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120413/9a3ca9f9/attachment-0001.htm

More information about the seaside mailing list