You can set an ADF array combobox binding on this basic UI component that you insert from the Data Control Palette:
The array combobox binding lets the user view and, in some cases, edit the values displayed from a list defined by an attribute that specifies an array. You use the array binding editor to select the data collection and attribute.
Note: In an ADF Business Components project, you can make attribute values updateable by setting a control hint on the attribute. In that case, users will be able to edit the updateable attribute's values directly.
To set an array combobox binding:
In the top portion of the Data Control Palette, select the desired attribute that specifies an array.
Be sure to select an attribute and not a data collection.
From the Data Control Palette, add the desired control to the data panel.
From the Structure window, display the array combobox binding editor for the desired control .
In the array combobox binding editor, select the Data Collection that contains the attribute you want to display.
In the Attribute list, select a single attribute of type array to display the values in the combobox control.
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 selection. Before you change the iterator selection, take note of the original attribute selection. If you need to, you can press Cancel to exit the binding editor without updating the original attribute selection. 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() or setDocument()
method in the jbInit() method to create the control
binding. For example, after inserting the JUArrayComboBox from the Data
Control Palette, the method which references DataControlId
to specify the meta-data, looks like this:
jUArrayComboBox.setArrayBinding((JUDefaultControlBinding)panelBinding.bindUIControl("DataControlId",
jUArrayComboBox));
Meta-data for the new binding appears in the binding definition (
UIModel.xml):
<DCControl
id="SameAsAttributeName"
SubType="DCDefaultControl"
ControlClass="oracle.jbo.uicli.controls.JUArrayControlComboBox"
IterBinding="DataCollectionIteratorId"
ApplyValidation="false"
<AttrNames>
<Item Value="MySelectedArrayAttribute" />
</AttrNames>
</DCControl>
About the ADF Bindings and Swing Controls
Copyright © 1997, 2004, Oracle. All rights reserved.