You can set an ADF list binding in navigation mode on these UI controls that you insert from the Data Control Palette:
A navigation mode binding lets users navigate through the objects (rows) of a data collection. You use the list binding editor in navigation mode to select the data collection and the attributes to display for the objects. When the user changes the current data object selection using the bound control, any controls in the containing panel that are also bound to the same data collection through its attributes will display from the selected data object.
Note: Unlike the combobox, list, radio button group, and spinner, the NavigationBar control uses an ADF iterator binding to manage the position of the current data object on the data collection. See Customizing an ADF Iterator Binding for details about adding a JUNavigationBar to your JClient panel.
To set a list binding in navigation mode:
In the top portion of the Data Control Palette, select the desired data collection to navigate.
From the Data Control Palette, add the desired control to the data panel.
From the Structure window, display the list binding editor for the control.
In the list binding editor, select Navigation Mode from the List Binding Mode dropdown list.
In the Data Collection list, select the data collection that contains the data objects you want to navigate.
In the Available Attributes list, select the attribute to display and add it to the Display Attributes list. You may add as many attributes as desired to the Display Attributes list.
Hint: Select multiple attributes when you think displaying more information will help the user understand what each data object selection represents.
If the iterator dropdown list already displays a named iterator to access the selected data collection, leave the selection unchanged. If the dropdown appears empty, click New and create the iterator so it appears in the dropdown list.
Warning: Changing the iterator selection in the dropdown list will remove the previously made attribute selections. Before you change the iterator selection, take note of the original attribute selections. If you need to, you can press Cancel to exit the binding editor without updating the original attribute selections. If you create the binding and decide not to use it, you can remove the unused iterator binding from the binding definition file ; pressing Cancel in the editor will not automatically delete the binding.
Click OK to save the binding settings.
JDeveloper adds the setModel() method in the jbInit()
method to create the control binding. For example, after inserting a combobox
from the Data Control Palette, the method which references
DataControlId to specify the meta-data, looks like this:
myComboBox.setModel((ComboBoxModel)panelBinding.bindUIControl("DataControlId",
myComboBox));
Meta-data for the new binding appears in the binding definition file (
UIModel.xml):
<DCControl
id="SameAsDataCollectionName"
DefClass="oracle.jbo.uicli.jui.JUComboBoxDef | JUListSingleSelDef | JUButtonGroupDef | JUSpinnerDef"
SubType="DCComboBox | DCListSingleSel | DCButtonGroup | DCSpinner"
IterBinding="MyDataCollectionIterator"
ApplyValidation="false"
ListOperMode="1"
StaticList="true"
<? List control only ?>
ShouldScroll="false"
<AttrNames>
<Item Value="MySelectedAttribute" />
</AttrNames>
<? Spinner control only ?>
<SpinnerNumberModelDef >
</SpinnerNumberModelDef>
<SpinnerDateModelDef
CalendarField="0" >
</SpinnerDateModelDef>
</DCControl>
About the ADF Bindings and Swing
Controls
About
Navigating the UI Using JClient Controls
Using the JClient JUNavigationBar Control
Copyright © 1997, 2004, Oracle. All rights reserved.