java.lang.Object
jakarta.faces.model.DataModel<E>
org.omnifaces.model.IterableDataModel<E>
- All Implemented Interfaces:
Iterable<E>
IterableDataModel is an implementation of
DataModel that wraps an Iterable.
This can be used to encapsulate nearly every collection type, including Collection derived types such as
List and Set. As such this specific DataModel can be used instead of more specific DataModels like
ListDataModel and CollectionDataModel.
- Since:
- 1.5
- Author:
- Arjan.Tijms
-
Constructor Summary
ConstructorsConstructorDescriptionIterableDataModel(Iterable<E> iterable) Construct the iterable data model based on the given iterable instance. -
Method Summary
Modifier and TypeMethodDescriptionintintbooleanvoidsetRowIndex(int rowIndex) voidsetWrappedData(Object data) Methods inherited from class jakarta.faces.model.DataModel
addDataModelListener, getDataModelListeners, iterator, removeDataModelListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IterableDataModel
Construct the iterable data model based on the given iterable instance.- Parameters:
iterable- The iterable instance to construct the iterable data model for.
-
-
Method Details
-
isRowAvailable
public boolean isRowAvailable()- Specified by:
isRowAvailablein classDataModel<E>
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin classDataModel<E>
-
getRowData
- Specified by:
getRowDatain classDataModel<E>
-
getRowIndex
public int getRowIndex()- Specified by:
getRowIndexin classDataModel<E>
-
setRowIndex
public void setRowIndex(int rowIndex) - Specified by:
setRowIndexin classDataModel<E>
-
getWrappedData
- Specified by:
getWrappedDatain classDataModel<E>
-
setWrappedData
- Specified by:
setWrappedDatain classDataModel<E>
-