About Control Binding in JClient

Populating Controls with Data

After data browsing panels are initialized, the layout panel calls executeIfNeeded() on the panel binding to execute the query on the Business Components data source.

This executeIfNeeded() method determines whether the query had been executed on the view object, and if not, the method calls executeQuery() on it. This executed query brings data from the database into the cache and causes the Oracle ADF Business Components row set listener events to fire. The first among these would be the RowSetListener.rangeRefreshed event. This event is captured by the iterator binding (because it implements RowSetListener and has registered itself as a listener). It retrieves the rows of the range and calls updateValuesFromRows() on the control binding. The control binding takes the data out from the rows and assigns them to the controls using the Swing API. As a result, the Swing API updates the panel UI with the data.

Updating Data through Controls

The user&rsquos interaction with a JClient-bound control may cause the Oracle ADF Business Components to update the data. For example, in the case of the text field (textFieldDname), if the user edits the text field&rsquos content and leaves the control (generating focusLost event), JClient is notified of the event. As a result, JClient will retrieve the updated data from the control and call setAttribute() on the row.

 

Copyright © 1997, 2004, Oracle. All rights reserved.