The state management has contracts of the web UI framework on both client and server
side.
The state management task has interface contracts on both
the client side (JavaScript)
and the server side (Java™).
For
more information, refer to:
- The Ext JS framework documentation for Version 2.2.1 or Version 3.0.2.
- The Java API documentation
in your installation directory (<INSTALL_DIR>/xapidocs/core_javadocs).
Interface Contract |
Description |
Methods |
SC.platform.state.StateProvider (client side) |
Implements the Ext.state.Provider base class
for state provider implementations.
Ext.state.Provider has the
following methods:
- get
Returns the current value for a key.
- clear
Clears a value from the state.
- set
Sets the value for a key.
An example of a custom implementation of state management
is in the Ext.state.CookieProvider class.
|
Includes the following utility methods:
- Retrieves the state from the database, given the ScreenName and
the ComponentName.
- Retrieves a list of all component states from a database, given
a ScreenName.
- Persists a state to a database, given a ScreenName and a ComponentName.
- Clears a state, given a ScreenName and a ComponentName.
|
ISCUIStateProvider (server side) |
Manages the saving and retrieving of the UI
state.
Use one of the following methods to implement this contract:
- Make the following web.xml context parameter entry:
- <param-name>
- scui-uistate-provider
- </param-name>
- <param-value>
- (Fully qualified class name of the implementation)
- </param-value>
- Call the setUIStateProvider utility method of the SCUIStateHelper
class.
|
- getUIState(userId, componentId, screenId, applicationId, uiContext)
Retrieves
the state of the given component.
- getListOfUIStatesForScreen(userId, screenId, applicationId, uiContext)
Retrieves
the full list of state information for all components belonging to
the specified screen.
- init(servletContext)
Performs initialization. Called only once
in the life cycle.
- saveUIState(uiState, uiContext)
Saves/persists the provided
state object.
- saveUIStatesList(uiStateList, uiContext)
Saves/persists the
provided list of state objects.
|