|
Oracle Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E10684-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.faces.model.DataModel
org.apache.myfaces.trinidad.model.CollectionModel
org.apache.myfaces.trinidad.model.CollectionModelDecorator
oracle.adf.view.rich.model.ActiveCollectionModelDecorator
public abstract class ActiveCollectionModelDecorator
Users of this class are able to enable active data with the existing data models inside their JSF pages. This class will wrap the existing data model in the page and add additional active data functionality in the decorator itself. Users then replace the binding in the page to point to the decorator Example usage: original page:
<af:table value="#{the.original.collectionModel}"></af:table>
replace with :
<af:table value="#{activeModelDecorator}"></af:table>
where activeModelDecorator is a managed bean subclassing the ActiveCollectionModelDecorator subclasses will look something like this: public class MyDecorator extends ActiveCollectionModelDecorator
{
public CollectionModel getCollectionModel()
{
return _collectionModel;
}
public ActiveDataModel getActiveDataModel()
{
return _activeDataModel;
}
}
getActiveDataModel()
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface oracle.adf.view.rich.model.ActiveDataModel |
---|
ActiveDataModel.ActiveDataPolicy |
Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex |
---|
org.apache.myfaces.trinidad.model.LocalRowKeyIndex.Confidence, org.apache.myfaces.trinidad.model.LocalRowKeyIndex.LocalCachingStrategy |
Constructor Summary | |
---|---|
ActiveCollectionModelDecorator() |
Method Summary | |
---|---|
abstract ActiveDataModel |
getActiveDataModel() returns the ActiveDataModel implementation |
ActiveDataModel.ActiveDataPolicy |
getActiveDataPolicy() always return ActiveDataPolicy.ACTIVE |
int |
getCurrentChangeCount() Returns the current monotonically increasing change count for this ActiveDataModel This change count is used by the UI components to maintain read consistency between model data fetches and the active data updates. |
void |
startActiveData(java.util.Collection<java.lang.Object> rowKeys, int startChangeCount, ActiveDataListener listener) Called by the DataUpdateManager to notify the ActiveDataModel to start delivering change notifications for the collections of the containers identified by the rowKeys. |
void |
stopActiveData(java.util.Collection<java.lang.Object> rowKeys, ActiveDataListener listener) Called by the DataUpdateManager to notify the ActiveDataModel to stop delivering change notifications for the collections of the container identified by the given rowKeys The rowKeys are for the wrapped collection model by the CollectionModelDecorator |
Methods inherited from class org.apache.myfaces.trinidad.model.CollectionModelDecorator |
---|
addDataModelListener, areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearLocalCache, getCachingStrategy, getCollectionModel, getDataModelListeners, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowCount, getRowData, getRowData, getRowIndex, getRowKey, getSortCriteria, getWrappedData, isRowAvailable, isRowAvailable, isRowLocallyAvailable, isRowLocallyAvailable, isSortable, removeDataModelListener, setRowIndex, setRowKey, setSortCriteria, setWrappedData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActiveCollectionModelDecorator()
Method Detail |
---|
public ActiveDataModel.ActiveDataPolicy getActiveDataPolicy()
ActiveDataPolicy.ACTIVE
getActiveDataPolicy
in interface ActiveDataModel
ActiveDataModel.ActiveDataPolicy
public void startActiveData(java.util.Collection<java.lang.Object> rowKeys, int startChangeCount, ActiveDataListener listener)
CollectionModelDecorator
startActiveData
in interface ActiveDataModel
rowKeys
- the container row keys of the collection, from which the ActiveDataListener receives active events. Pass null or empty collection for root collection.startChangeCount
- Change count to start sending active data from.listener
- ActiveDataListener for the ActiceDataModel to use when notifying the DataUpdateManager of changesjava.lang.IllegalStateException
- if ActiveDataPolicy is STATICjava.lang.IllegalArgumentException
- if listener
is null
or the startChangeCount
is greater than the current change count.stopActiveData(java.util.Collection<java.lang.Object>, oracle.adf.view.rich.event.ActiveDataListener)
public void stopActiveData(java.util.Collection<java.lang.Object> rowKeys, ActiveDataListener listener)
CollectionModelDecorator
stopActiveData
in interface ActiveDataModel
rowKeys
- the container row keys of the collections, from which the ActiveDataListener receives active events. Pass null or empty collection for root collection.listener
- the ActiveDataListener to be removed ActiveDataListener receives active events. Pass null for root collection.java.lang.IllegalStateException
- If called on an ActiveDataModel that was never started by calling startActiveData
startActiveData(java.util.Collection<java.lang.Object>, int, oracle.adf.view.rich.event.ActiveDataListener)
public int getCurrentChangeCount()
getCurrentChangeCount
in interface ActiveDataModel
public abstract ActiveDataModel getActiveDataModel()
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E10684-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |