org.ajax4jsf.model
Class SequenceDataModel<E>
java.lang.Object
javax.faces.model.DataModel<E>
org.ajax4jsf.model.ExtendedDataModel<E>
org.ajax4jsf.model.SequenceDataModel<E>
- All Implemented Interfaces:
- java.lang.Iterable<E>
public class SequenceDataModel<E>
- extends ExtendedDataModel<E>
- Author:
- shura
| Methods inherited from class javax.faces.model.DataModel |
addDataModelListener, getDataModelListeners, iterator, removeDataModelListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceDataModel
public SequenceDataModel(javax.faces.model.DataModel<E> wrapped)
- Parameters:
wrapped -
walk
public void walk(javax.faces.context.FacesContext context,
DataVisitor visitor,
Range range,
java.lang.Object argument)
- Description copied from class:
ExtendedDataModel
- Iterate over model by "visitor" pattern, for given range
- Specified by:
walk in class ExtendedDataModel<E>
- Parameters:
context - current JSF context.visitor - instance of DataVisitor, for process each row.range - Implementation-specific range of data keys.argument - Implementation-specific argument
getRowKey
public java.lang.Object getRowKey()
- Specified by:
getRowKey in class ExtendedDataModel<E>
- Returns:
- key for selected data or
null
setRowKey
public void setRowKey(java.lang.Object key)
- Description copied from class:
ExtendedDataModel
Instead of simple int for current state selection, this model can use any object for
select current data. Implementation depend on model, with any restrictions :
- key must be
Serializable.
Object.toString() method must return representation compatible with
UIComponent.getClientId(javax.faces.context.FacesContext),
as far as this string will be appended to clientId of iterator component.
- Specified by:
setRowKey in class ExtendedDataModel<E>
- Parameters:
key - key for select current data, or null for clear selection.
getRowCount
public int getRowCount()
- Specified by:
getRowCount in class javax.faces.model.DataModel<E>
getRowData
public E getRowData()
- Specified by:
getRowData in class javax.faces.model.DataModel<E>
getRowIndex
public int getRowIndex()
- Specified by:
getRowIndex in class javax.faces.model.DataModel<E>
getWrappedData
public java.lang.Object getWrappedData()
- Specified by:
getWrappedData in class javax.faces.model.DataModel<E>
isRowAvailable
public boolean isRowAvailable()
- Specified by:
isRowAvailable in class javax.faces.model.DataModel<E>
setRowIndex
public void setRowIndex(int rowIndex)
- Specified by:
setRowIndex in class javax.faces.model.DataModel<E>
setWrappedData
public void setWrappedData(java.lang.Object data)
- Specified by:
setWrappedData in class javax.faces.model.DataModel<E>
getWrappedModel
protected javax.faces.model.DataModel<E> getWrappedModel()
- Returns:
- the wrappedModel
setWrappedModel
protected void setWrappedModel(javax.faces.model.DataModel<E> wrappedModel)
- Parameters:
wrappedModel - the wrappedModel to set
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.