[Seaside] Re: visitor information
Samuel Tardieu
sam at rfc1149.net
Tue Nov 9 16:53:50 CET 2004
>>>>> "Jim" == Jim Menard <jimm at io.com> writes:
Jim> For each visitor to a Web site, I need to track a few things: if
Jim> he's logged in, where in the navigation hierarchy he is, and
Jim> more. In Java, I'd save that information in an object and save
Jim> the object in the session. How is it done in Seaside? I've looked
Jim> at WASession, but don't see any obvious methods for storing and
Jim> retrieving values.
You can subclass WASession with JimSession (for example) and add new
instance variables and configure Seaside (in /seaside/config) to use
this new session class instead of the default one.
If, for example, you add an instance variable "username" and its
accessors ("username" and "username:"), you will be at any point able
to use:
self session username
and
self session username: 'xxx'
Sam
--
Samuel Tardieu -- sam at rfc1149.net -- http://www.rfc1149.net/sam
More information about the Seaside
mailing list