BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags
Interface DataAccessProvider

All Known Implementing Classes:
CellRepeater, Grid, Repeater

public interface DataAccessProvider

The DataAccessProvider interface is implemented by objects that need to provide their children with data and wish to make it available to them with the container binding context. Expression evaluation will process all container context references against this interface; several read-only properties are exposed:

MethodNetUI Data Binding ExpressionRequired
getCurrentIndex()container.indexYes
getCurrentItem()container.itemYes
getCurrentMetadata()container.metadataNo
getDataSource()container.dataSourceYes
getProviderParent()container.containerYes
In cases where a DataAccessProvider contains another DataAccessProvider, the grandparent DataAccessProvider may be referenced with the binding expression container.container. For example, the item, with the property firstName, may be accessed with the expression container.container.item.firstName.

The general use of the DataAccessProvider is as an interface that is implemented by repeating databound tags that iterate over a data set and render each item in that data set. The item and iteration index are exposed through this interface and can be bound to by tags inside of the repeating tag that implements the DataAccessProvider interface. This binding expression should start with container and reference one of the properties above.


Method Summary
 int getCurrentIndex()
          Get the current index in this iteration.
 Object getCurrentItem()
          Get the current data item in this DataAccessProvider.
 Object getCurrentMetadata()
          Get a metadata object for the current item.
 String getDataSource()
          Get the expression that references the data item to which the DataAccessProvider is bound.
 DataAccessProvider getProviderParent()
          Get the parent DataAccessProvider of a DataAccessProvider.
 void setDataSource(String dataSource)
           
 

Method Detail

getCurrentIndex

int getCurrentIndex()
Get the current index in this iteration. This should be a zero based integer that increments after each iteration.

Returns:
the current index of iteration or 0

getCurrentItem

Object getCurrentItem()
Get the current data item in this DataAccessProvider.

Returns:
the current data item or null

setDataSource

void setDataSource(String dataSource)

getDataSource

String getDataSource()
Get the expression that references the data item to which the DataAccessProvider is bound.

Returns:
the expression referencing the data source or null if no dataSource is set

getCurrentMetadata

Object getCurrentMetadata()
Get a metadata object for the current item. This interface is optional, and implementations of this interface are provided by the DataAccessProvider interface. See these implementations for information about their support for current item metadata.

Returns:
the current metadata or null if no metadata can be found or metadata is not supported by a DataAccessProvider implementation

getProviderParent

DataAccessProvider getProviderParent()
Get the parent DataAccessProvider of a DataAccessProvider. A DataAccessProvider implementation may be able to nest DataAccessProviders. In this case, it can be useful to be able to also nest access to data from parent providers. Implementations of this interface are left with having to discover and export parents. The return value from this call on an implementing Object can be null.

Returns:
the parent DataAccessProvider or null if this method is not supported or the parent can not be found.

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.