Limiting Rows to Fetch Using an ADF Iterator Binding

Use this topic when your business service supports rowset iteration to fetch data as rows.

You can set the number of data objects in a range to fetch from the bound data collection when you do not want to work with an entire set or when you want to display a certain number of data objects on the page. The range defines a window you can use to access a subset of the data objects in the collection. By default, the range size is set to a range that fetches just ten data objects.

Tip: In general, it is recommended that all iterator bindings referred to by multiple binding containers in one application should utilize the same range size. Utilizing the same range size prevents the binding container from generating unneccessary fetch operations against the same data collection. When your application requires different range sizes and you are using Oracle ADF Business Components, you can create a secondary row set iterator declaratively by creating an iterator binding against a given collection and providing a unique name (within the view object's row set iterators).

To set the range size for an iterator binding:

  1. With the document open in the Visual Editor, choose View | Structure to open the Structure window.

  2. Click UI Model tab icon (UI Model) in the Structure window toolbar and expand the node to display the list of bindings.

  3. Select the iterator binding for which you wish to set a range size and choose View | Property I nspector to open the Property Inspector.

  4. In the Range Size field of the Property Inspector, edit the value and press Enter. The default value is 10.

    Note that the values -1 and 0 have specific meaning: the value -1 returns all available objects from the collection, while the value 0 will return the same number of objects as the collection uses to retrieve from its data source.

When you use the Data Control Palette to drop Next Set or Previous Set operations (displayed as a Button component when you work with Oracle ADF Business Components) onto your page, the range size for the iterator will be set by default to fetch ten data objects at a time. This behavior will override any previous setting you may have made for the iterator. To maintain a unique range size with Oracle ADF Business Components, you can specify a row set iterator name for the iterator binding in the Property Inspector.

To specify a secondary row set iterator for a collection (supported by ADF Business Components only):

  1. With theUI Model tab icon (UI Model) displayed in the Structure window, select the iterator binding for which you wish to supply a unique rowset iterator name.

    Supplying a unique name for the rowset iterator for which the binding operates ensures that another page's iterator binding will not reset the range size on the binding container.

  2. Locate the Rowset Iterator field of the Property Inspector, which initially has no value.

  3. Type a unique identifying name for property of the selected iterator binding and press Enter.

    At runtime, the binding container will create a unique rowset iterator corresponding to the customized iterator binding.


About the Oracle ADF Bindings

Creating a New Row with an ADF Iterator Binding

 

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