You can set an ADF scroll binding on these UI controls that you insert from the Data Control Palette:
The scroll binding lets users view the relative position of the current data object in the bound data collection. The control thumb or indicator will be proportional to the number of data objects displayed out of the full range of the data collection. You use the scroll binding editor to select the data colleciton on which you want the control to operate.
To set a scroll binding:
In the top portion of the Data Control Palette, select the desired data collection to scroll.
From the Data Control Palette, add the desired control to the data panel.
From the Structure window, display the scroll binding editor for the desired control.
In the scroll binding editor, select the Data Collection that contains the data object to scroll.
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.
Note: This option is visible only when the model project contains Oracle ADF Business Components; when other business services are created in the model project, this option is not supported. In the case of an ADF Business Components model project, this option appears selected by default because, when unselected (thereby forcing the actual row count), it may trigger an additional query.
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 slider
from the Data Control Palette, the method which references
DataControlId to specify the meta-data, looks like this:
mySlider.setModel((BoundedRangeModel)panelBinding.bindUIControl("DataControlId",
mySlider));
Meta-data for the new binding appears in the binding definition file (
UIModel.xml):
<DCControl
id="SameAsDataCollectionName"
DefClass="oracle.jbo.uicli.jui.JUScrollBarDef | JUSliderDef"
SubType="DCScrollbar | DCSlider"
IterBinding="DataCollectionIteratorId"
ScrollCurrRow="true"
DeferAssignValues="false"
UseEstRC="true"
Horizontral="false"
</DCControl>
About the ADF Bindings and Swing Controls
Copyright © 1997, 2004, Oracle. All rights reserved.