Documentation Archive Developer
Search
Table of Contents Previous Section

WOStateStorage

Synopsis

WOStateStorage { [size=numBytes;] ... };

Description

A WOStateStorage element provides a simple mechanism for storing application state in an HTML page. If you include a WOStateStorage element in a form, any session and persistent data will be stored in the page rather than on the server. (For a detailed discussion of state management in WebObjects applications, see the chapter "Managing State" in the WebObjects Developer's Guide).

WOStateStorage uses HTML hidden fields ( <INPUT TYPE="HIDDEN"...>) to store state data. It will use as many hidden fields as needed to store the data, but no field will be larger than the size specified by the size attribute. The default size setting is designed to work with most browsers.

size
Maximum size for each of the hidden fields used to store the state data. This attribute is optional; if size is not specified, the maximum size for hidden fields will be 1000 bytes.
Since WOStateStorage elements are implemented using hidden fields-which in HTML must be located within a form-they too must be located within a form. If a page has more than one form, you must declare a WOStateStorage element within each form.

Table of Contents Next Section