You may need to save user preference variables persistently within an
application’s OpenSocial gadget. This is where the
UserPref element comes into play. It allows you to configure which
variables you would like to store for a user. These configuration
sections, provide simple key/value storage without requiring you to set up
UserPref contains a number of
configurable attributes, listed in Table 3-7.
Table 3-7. UserPref attributes
An optional string
that denotes the date type present within the user
preference variable. The value may be
An optional string that stores a default value for a user preference in the event that the user does not specify a variable configuration.
An optional string that represents the user preference during editing. This value must be unique.
The name of the user preference. This value is required and must be a unique value.
An optional Boolean value (