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

    java.lang.Object
      javax.faces.model.DataModel<E>
          org.ajax4jsf.model.ExtendedDataModel<E>

All Implemented Interfaces:
  Iterable<E>

Direct Known Subclasses:
  SequenceDataModel

    public abstract class ExtendedDataModel<E>

extends javax.faces.model.DataModel<E>

Extesion for `DataModel` , for support complex data structure, like tree, spreadsheet etc in iterable components.

Author:
  shura

Constructor Summary
`ExtendedDataModel()`

Method Summary
`abstract Object` | `getRowKey()`
`abstract void` | `setRowKey(Object key)` Instead of simple `int` for current state selection, this model can use any object for select current data.
`abstract 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, getRowCount, getRowData, getRowIndex, getWrappedData, isRowAvailable, iterator, removeDataModelListener, setRowIndex, setWrappedData`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExtendedDataModel

    public ExtendedDataModel()

Method Detail

### setRowKey

    public abstract void setRowKey(Object key)

  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.

  Parameters:
    `key` - key for select current data, or null for clear selection.

### getRowKey

    public abstract Object getRowKey()

  Returns:
    key for selected data or `null`

### walk

    public abstract void walk(javax.faces.context.FacesContext context,
                              DataVisitor visitor,
                              Range range,
                              Object argument)

  Iterate over model by "visitor" pattern, for given range

  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:
    `IOException`

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.