WARequestContext

Rationale

Over time WASession became more and more covered with functionality that was not session related and only relevant for a single request. To counter this Seaside 3.0 introduces WARequestContext where request handling information is stored.

Usage

WARequestContext can be access in a similar way how WASession could be accessed in Seaside 2.8 and earlier.

WACurrentRequestContextvalue."answers the current request contest"WACurrentRequestContextvaluerequest."answers the current request"WACurrentRequestContextvaluesession."answers the current session"WACurrentRequestContextvalueapplication."answers the current application"

We also added GRObject as a common superclass of most classes in Seaside. From within any object that subclasses GRObject you can also access the current request context like so:

selfrequestContext.

Similarly there are shortcuts for the current session and application:

selfsession.selfapplication.

Migration

Seaside 2.8 code should mostly continue working. However we deprecated the following methods on WASession and moved them to WARequestContext: