Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces Core API 4.3.1.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  Iterable<E>

    public class SequenceDataModel<E>

extends ExtendedDataModel<E>

Author:
  shura

Constructor Summary
`SequenceDataModel(javax.faces.model.DataModel<E> wrapped)`

Method Summary
`int` | `getRowCount()`
`E` | `getRowData()`
`int` | `getRowIndex()`
`Object` | `getRowKey()`
`Object` | `getWrappedData()`
`protected javax.faces.model.DataModel<E>` | `getWrappedModel()`
`boolean` | `isRowAvailable()`
`void` | `setRowIndex(int rowIndex)`
`void` | `setRowKey(Object key)` Instead of simple `int` for current state selection, this model can use any object for select current data.
`void` | `setWrappedData(Object data)`
`protected void` | `setWrappedModel(javax.faces.model.DataModel<E> wrappedModel)`
`void` | `walk(javax.faces.context.FacesContext context, DataVisitor visitor, Range range, Object argument)` Iterate over model by "visitor" pattern, for given range

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`

Constructor Detail

### SequenceDataModel

    public SequenceDataModel(javax.faces.model.DataModel<E> wrapped)

Parameters:
  `wrapped` -

Method Detail

### walk

    public void walk(javax.faces.context.FacesContext context,
                     DataVisitor visitor,
                     Range range,
                     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 Object getRowKey()

  Specified by:
    `getRowKey` in class `ExtendedDataModel<E>`
  Returns:
    key for selected data or `null`

### setRowKey

    public void setRowKey(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 :

  1. key must be `Serializable`.
  2. `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 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(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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces Core API 4.3.1.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.