Faces Client: Set up event handlers
Event Handlers for the Faces Client Components are written through the Quick Edit View. The Properties view of the Faces Client Components contain a link to the Quick Edit view. For the Tree View and the Data Grid, you can use the out-of-box event handlers or write your own customized event handlers.
There are two out-of-box event handlers.
Set selected object as root in target component
This handler takes the object selected in the current control (optionally, a specific reference within that object) and makes it the root object in the target control. For this type of an event handler, the target control can be any Faces Client Component, except Web Service, and the standard JSF components supported by the Faces Client, which are bound to the same kind of object as the one from which the event originated. The list of possible target controls are shown in the configuration dialog that comes up. Use this event handler when you want the selected object in the Tree View (source) to determine what is shown in the Data Grid (target). This handler does not change any data values from the data source, but it does set what is displayed in the selected control.- Bind selected object to another object
This handler takes the value of the selected object (optionally, a specific reference within that object) and binds it to another data object. This event handler sets data values stored in a data object, for example, a JavaBean, a relational database record, etc. In the Portfolio sample, when a user chooses a specific stock from the Data Grid, the values of the fields in that stock object are copied to the placeHolderStock data object, which is later used as an input parameter to the Web Service. The handler changes the value stored in that object.