Using the PODSPrefs object

To store a value in the PODSPrefs object, use this JavaScript command in the page from which your application is passing control to another page:

avantgo.preferences.setStringValueForKey(key, valueStr)

Where:

  • preferences is the PODSPrefs object

  • key is the preference key value

  • valueStr is the value to which the preference is to be set

To retrieve a value from the PODSPrefs object, use this JavaScript command in the page to which your application is passing control from another page:

avantgo.preferences.getStringValueForKey(key)

Where:

  • preferences is the PODSPrefs object

  • key is the preference key value

For more information, see getStringValueForKey( ) and setStringValueForKey( ). Accessing the PODSPrefs object is documented in preferences.


Master-detail page example
Storing application state information in the PODSPrefs object
Retrieving application state information in the detail page