8.3 The SimpleAppContext Class

The SimpleAppContext class is intended to be used for applications which store state at the browser in hidden HTML fields. An inheritance diagram illustrates the relationship to the SimpleContext class described above.

Figure: The SimpleAppContext class
 
\includegraphics[]{simpleappcontext}

The SimpleAppContext class provides the following functionality to your application.

The methods implemented in the SimpleAppContext class are:

__init__( app)
When you inherit from the SimpleAppContext class you must call this constructor.

The app argument is passed to the AppContext constructor.

form_close( )
Invokes the form_close() method of the NameRecorderMixin class and encode_session() of the HiddenFieldSessionMixin class.

write_headers( )
Writes the following HTTP headers.

Pragma: no-cache
Content-Type: text/html