| org.apache.beehive.netui.script.common.IDataAccessProvider
All known Subclasses: org.apache.beehive.netui.tags.html.HtmlGroupBaseTag, org.apache.beehive.netui.tags.databinding.datagrid.DataGrid, org.apache.beehive.netui.tags.databinding.repeater.Repeater, org.apache.beehive.netui.tags.databinding.cellrepeater.CellRepeater, org.apache.beehive.netui.tags.html.Select,
IDataAccessProvider | public interface IDataAccessProvider (Code) | | The IDataAccessProvider 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:
Method | NetUI Data Binding Expression | Required |
getCurrentIndex() | container.index | Yes |
getCurrentItem() | container.item | Yes |
getCurrentMetadata() | container.metadata | No |
getDataSource() | container.dataSource | Yes |
getProviderParent() | container.container | Yes |
In cases where a IDataAccessProvider contains another IDataAccessProvider, the
grandparent IDataAccessProvider 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 IDataAccessProvider 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 IDataAccessProvider interface. This binding expression
should start with container and reference one of the properties above.
|
getCurrentIndex | public int getCurrentIndex()(Code) | | Get the current index in this iteration. This should be a
zero based integer that increments after each iteration.
the current index of iteration or 0 |
getCurrentItem | public Object getCurrentItem()(Code) | | Get the current data item in this IDataAccessProvider.
the current data item or null |
getCurrentMetadata | public Object getCurrentMetadata()(Code) | | Get a metadata object for the current item. This interface
is optional, and implementations of this interface are
provided by the IDataAccessProvider interface. See these
implementations for information about their support for
current item metadata.
the current metadata or null if no metadata can befound or metadata is not supported by a IDataAccessProvider implementation |
getDataSource | public String getDataSource()(Code) | | Get the expression that references the data item to which the
IDataAccessProvider is bound.
the expression referencing the data source or null if nodataSource is set |
getProviderParent | public IDataAccessProvider getProviderParent()(Code) | | Get the parent IDataAccessProvider 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 .
the parent DataAccessProvider or null if this methodis not supported or the parent can not be found. |
|
|