org.richfaces.model
Class ListShuttleDataModel
java.lang.Object
javax.faces.model.DataModel
org.ajax4jsf.model.ExtendedDataModel
org.richfaces.model.ListShuttleDataModel
public class ListShuttleDataModel
- extends ExtendedDataModel
Dual map-based extended data model for model-translating components like list shuttle
- Author:
- Nick Belaevski
Methods inherited from class javax.faces.model.DataModel |
addDataModelListener, getDataModelListeners, removeDataModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListShuttleDataModel
public ListShuttleDataModel()
getRowKey
public java.lang.Object getRowKey()
- Specified by:
getRowKey
in class ExtendedDataModel
- 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
- Parameters:
key
- key for select current data, or null for clear selection.
walk
public void walk(javax.faces.context.FacesContext context,
DataVisitor visitor,
Range range,
java.lang.Object argument)
throws java.io.IOException
- Description copied from class:
ExtendedDataModel
- Iterate over model by "visitor" pattern, for given range
- Specified by:
walk
in class ExtendedDataModel
- Parameters:
context
- current JSF context.visitor
- instance of DataVisitor
, for process each row.range
- Implementation-specific range of data keys.argument
- Implementation-specific argument
- Throws:
java.io.IOException
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in class javax.faces.model.DataModel
getRowData
public java.lang.Object getRowData()
- Specified by:
getRowData
in class javax.faces.model.DataModel
getRowIndex
public int getRowIndex()
- Specified by:
getRowIndex
in class javax.faces.model.DataModel
getWrappedData
public java.lang.Object getWrappedData()
- Specified by:
getWrappedData
in class javax.faces.model.DataModel
isRowAvailable
public boolean isRowAvailable()
- Specified by:
isRowAvailable
in class javax.faces.model.DataModel
setRowIndex
public void setRowIndex(int rowIndex)
- Specified by:
setRowIndex
in class javax.faces.model.DataModel
setWrappedData
public void setWrappedData(java.lang.Object data)
- Specified by:
setWrappedData
in class javax.faces.model.DataModel
Copyright © 2009. All Rights Reserved.