org.richfaces.fragment.dataGrid

## Interface DataGrid<RECORD>

- Type Parameters:
    `RECORD` - the smallest data unit of this data grid
  All Known Implementing Classes:
    RichFacesDataGrid

      public interface DataGrid<RECORD>

  Interface representing a data grid.

  Each grid consists of its record. It should be page fragment, which will be then returned as a properly initialized object.

  It is solely on the end user how the implementations of the RECORD would look like. For example it can return the text of the particular grid's record

  Note 1: Grid does not take into account pagination. Thus one has to switch to a different page manually in order to access all records. All indexes used by methods are relative to one page.

  Note 2: that one can use `org.richfaces.fragment.common.NullFragment` as a Null Object pattern for RECORD generic type.

  Author:
    Juraj Huska

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<RECORD>` | `getAllVisibleRecords()` Returns all records currently rendered in this grid.
    `int` | `getNumberOfColumns()` Returns number of the columns in this data grid.
    `int` | `getNumberOfRecords()` Returns number of records on the current page.
    `int` | `getNumberOfRows()` Returns number of the rows in this data grid.
    `RECORD` | `getRecord(int n)` Return a particular record from actual page.
    `List<RECORD>` | `getRecordsInRow(int rowIndex)` Returns all RECORDs in a particular row.

- - ### Method Detail

    - #### getRecordsInRow

          List<RECORD> getRecordsInRow(int rowIndex)

      Returns all RECORDs in a particular row.
      Parameters:
        `rowIndex` - zero based index of the row, from which all records will be returned
      Returns:

    - #### getAllVisibleRecords

          List<RECORD> getAllVisibleRecords()

      Returns all records currently rendered in this grid.
      Returns:
        all records from the current page

    - #### getRecord

          RECORD getRecord(int n)

      Return a particular record from actual page.
      Parameters:
        `n` - zero based index of the record to be returned
      Returns:

    - #### getNumberOfRows

          int getNumberOfRows()

      Returns number of the rows in this data grid.
      Returns:

    - #### getNumberOfColumns

          int getNumberOfColumns()

      Returns number of the columns in this data grid.
      Returns:

    - #### getNumberOfRecords

          int getNumberOfRecords()

      Returns number of records on the current page.
      Returns:

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