[Seaside] Logging out from a session in 3.1

Johan Brichau johan at inceptive.be
Wed Feb 26 19:15:35 UTC 2014


> I migrated to Seaside 3.1 and now the session behaves differently.
> My session class had a #logout method which did:
> #logout
>  self unregister.
>   self redirectTo: '/', (WADispatcher default nameOfHandler: self application)
> But now there is no #redirectTo: in the WASession hierarchy. How can I
> implement the same functionality?

This was a deprecated method in Seaside 3.0:

		greaseDeprecatedApi: 'WASession>>#redirectTo:'
		details: 'Use WARequestContext>>#redirectTo:.'.
	self requestContext redirectTo: aUrlOrString

Where did you send #logout? I think you need to move the method to a callback in a component and have it send unregister to the session and redirect.
This is what we typically do:

	self session unregister.
	self requestContext redirectTo: self application url

> Also if I unregister, there is no handler installed, and self
> application returns nil, and #nameOfHandler: throws an exception.
> What is the proper way of performing this in Seaside 3.1?

Can you give some more details? I don't quite see what you mean.


More information about the seaside mailing list