Client data is derived from a Page Data component. The client data is formatted into JavaScript™ objects and included in the JSP that is sent to the browser. Sometimes you may want to configure the client data to achieve a better performance. You can prune the data to eliminate attributes that are not used, add client attributes, and regenerate client data when underlying data beans get changed. The Configure Client Data dialog provides these functions.
You access the Configure Client Data dialog from the Client Data view. Highlight the Client Data Object, right-click and select Configure. In the Configure Client Data dialog, there are two tabs: Basic and Advanced. In the Basic tab, you can prune the client data and add client attributes. The client data model name is optional in the Basic tab. Specify this field when you want to share a Client Data Object between portlets. Use the Primary key check box to mark a property in a bean as part of a primary key, which will achieve better performance.
Primary key limitation
You cannot use attributes of type java.util.Date as the primary key when the target server is WebSphere® Application Server 5.1.
Add a client data attribute
Synchronization of page data with client side data
Client data can be synchronized with page data, which represents the data on the server, when the user submits the page back to the server. This synchronization is enabled by default. The automatic update is supported for JavaBeans™, Relational Records Lists, Relational Records, and EGL records. If you want to write your own diff handlers to synchronize the client data and the page data, you can turn this feature off by deselecting Exclude changes to this element when synchronizing on the Basic tab of the Configure Client Data dialog.
Pruning a data graph
You can prune a data graph by deselecting the check box next to a node in the Client Data models section. By selecting only the information you need to display in the graph, you can save on performance and create a more understandable graph.
Removing and regenerating client data
In the Advanced tab of the Configure Client Data dialog, you have several buttons for loading emap source, regenerating from server side data, and removing client data from project.