Configuring client data

Note: Some Faces Client Components and Client Data have been deprecated and are not recommended for use.
The following have been deprecated and are not recommended for use:
  • Client Data and its associated tooling (such as the Client Data view)
  • Faces Client Components
    • <odc:dataGrid> (Data Grid)
    • <odc:webService> (Web Service)
    • <odc:clientData>
    • <odc:clientBinder>

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

In the Basic tab of the Configure Client Data dialog, you can add a client data attribute by pressing Add client attribute. At the bottom of the dialog, enter the following:
Type
This is the data type, such as integer, float, boolean, etc.
Name
This is the name of the attribute.
Expression
This is either a value or an expression.
Note: Adding client data attributes may affect performance because the supplied expression is invoked each time the client attribute is referenced to ensure that the latest values are used.

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.

Related reference
Faces Client components
Support for Faces components within the Faces Client framework
Properties for Faces Client Components
Supported JavaBean characters and data types

Feedback