Overview | Package | Class | Use | Tree | Deprecated | Index | Help
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:
  java.lang.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()`
`java.lang.Object` | `getRowKey()`
`java.lang.Object` | `getWrappedData()`
`protected javax.faces.model.DataModel<E>` | `getWrappedModel()`
`boolean` | `isRowAvailable()`
`void` | `setRowIndex(int rowIndex)`
`void` | `setRowKey(java.lang.Object key)` Instead of simple `int` for current state selection, this model can use any object for select current data.
`void` | `setWrappedData(java.lang.Object data)`
`protected void` | `setWrappedModel(javax.faces.model.DataModel<E> wrappedModel)`
`void` | `walk(javax.faces.context.FacesContext context, DataVisitor visitor, Range range, java.lang.Object argument)` Iterate over model by "visitor" pattern, for given range

Methods inherited from class org.ajax4jsf.model.ExtendedDataModel
`getSerializableModel`

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,
                     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 :

  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 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.