Customizing an ADF Iterator Binding

You can set an ADF iterator binding on this UI control that you insert from the Data Control Palette:

You use an iterator binding on a NavigationBar control to manage the position of the current data object on the data collection. When the user clicks on the navigation bar buttons, the data object position changes and any other indicator control bound to the same data collection gets updated.

To set an iterator binding:

  1. Open the data panel in the Java Visual Editor.

  2. In the top portion of the Data Control Palette, select the data collection to navigate.

  3. From the Data Control Palette, add the NavigationBar control to the data panel.

  4. From the Structure window, display the iterator binding editor for the desired control.

  5. In the iterator binding editor, select the Data Collection, that contains the data object you want to navigate.

  6. In Iterator Id, enter the name of the iterator as it will appear in the binding definition file.

  7. Click OK to save the binding settings.

JDeveloper adds the setModel() method in the jbInit() method to create the iterator binding. For example, after inserting a navigation bar from the Data Control Palette, the method which references IteratorId to specify the meta-data, looks like this:

jUNavigationBar.setModel(JUNavigationBar.createViewBinding(panelBinding, jUNavigationBar, "SelectedDataCollection", null, "IteratorId"));

Meta-data for the new binding appears in the binding definition file ( UIModel.xml):




<DCIterator

         id="MyIteratorId"

         Binds="DataCollectionReference"

</DCIterator>    

About the ADF Bindings and Swing Controls
Removing Unused Bindings from the Binding Definition File

 

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