Preserving session data
Each time a request comes in to your application from a Web browser, VA Smalltalk creates a new instance of your Page in response. This new instance exists only long enough to process the request and generate HTML in response; once the HTML has been sent back to the browser, the part goes away. This means that the subparts that make up your Web Connection part are not persistent; any information you store in a subpart of a Web Connection part is lost between one client request and the next.
For many applications, though, you might need to preserve some information across multiple requests. For example, if your application requires users to log in, you might want to keep track of the user's name or account information for the duration of the session. You might also want users to be able to interactively build a "shopping cart" of items selected during a session, all of which are to be processed at the end.
The CGI Link Session Data part provides a persistent location where you can store session-specific information or state data related to your application. Although the CGI Link Session Data part appears as a subpart of your Page part, its value attribute persists across multiple requests, for the duration of a session. The value attribute can contain any kind of Smalltalk object; by tearing off this attribute, you can access all of the attributes, actions, and events of that object. The default class for the value attribute is OrderedCollection.
Last modified date: 01/29/2015