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

## com.gwtext.client.data
Class GroupingStore

    java.lang.Object
      com.gwtext.client.core.JsObject
          com.gwtext.client.data.Store
              com.gwtext.client.data.GroupingStore

    public class GroupingStore

extends Store

A specialized store implementation that provides for grouping records by one of the available fields.

Field Summary

Fields inherited from class com.gwtext.client.data.Store
`configJS`

Fields inherited from class com.gwtext.client.core.JsObject
`jsObj`

Constructor Summary
`GroupingStore()` Construct a new GroupingStore.
`GroupingStore(DataProxy dataProxy, Reader reader)` Create a Store using the specified `DataProxy` and `Reader`.
`GroupingStore(DataProxy dataProxy, Reader reader, boolean remoteSort)` Create a Store using the specified `DataProxy` and `Reader`.
`GroupingStore(DataProxy dataProxy, Reader reader, UrlParam[] baseParams, SortState initialSortState, boolean remoteSort)` Create a Store using the specified configuration.
`GroupingStore(Reader reader)` Create a Store using the specified `Reader`.
`GroupingStore(RecordDef recordDef)` Create a Store using the specified `RecordDef`.

Method Summary
`void` | `clearGrouping()` Clears any existing grouping and refreshes the data using the default sort.
`void` | `groupBy(java.lang.String field)` Groups the data by the specified field.
`void` | `groupBy(java.lang.String field, boolean forceRegroup)` Groups the data by the specified field.
`void` | `setGroupField(java.lang.String groupField)` The field name by which to sort the store's data (defaults to '').
`void` | `setGroupOnSort(boolean groupOnSort)` True to sort the data on the grouping field when a grouping operation occurs, false to sort based on the existing sort info (defaults to false).
`void` | `setRemoteGroup(boolean remoteGroup)` True if the grouping should apply on the server side, false if it is local only (defaults to false).

Methods inherited from class com.gwtext.client.data.Store
`add, add, addSorted, addStoreListener, clearFilter, clearFilter, clearSortState, commitChanges, each, filter, filter, filter, filterBy, getAt, getBaseParams, getById, getCount, getFields, getJsObj, getModifiedRecords, getRange, getRecordAt, getRecords, getRecordsAsJS, getSortState, getTotalCount, indexOf, indexOfId, insert, insert, load, load, load, load, loadJsonData, loadXmlData, loadXmlDataFromUrl, query, query, query, queryBy, rejectChanges, reload, reload, reload, remove, removeAll, setAutoLoad, setBaseParams, setDataProxy, setDefaultSort, setDefaultSort, setInitialSortState, setPruneModifiedRecords, setReader, setRecordDef, setRemoteSort, setSortInfo, setStoreId, setUrl, sort, sort, sort, sum, sum`

Methods inherited from class com.gwtext.client.core.JsObject
`getProperties, isCreated, setJsObj`

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

Constructor Detail

### GroupingStore

    public GroupingStore()

  Construct a new GroupingStore.

### GroupingStore

    public GroupingStore(RecordDef recordDef)

  Create a Store using the specified `RecordDef`. Data can be added to the Store using `Store.add(Record)`

  Parameters:
    `recordDef` - the record def

### GroupingStore

    public GroupingStore(Reader reader)

  Create a Store using the specified `Reader`.

  Parameters:
    `reader` - the reader

### GroupingStore

    public GroupingStore(DataProxy dataProxy,
                         Reader reader)

  Create a Store using the specified `DataProxy` and `Reader`.

  Parameters:
    `dataProxy` - the data proxy
    `reader` - the reader

### GroupingStore

    public GroupingStore(DataProxy dataProxy,
                         Reader reader,
                         boolean remoteSort)

  Create a Store using the specified `DataProxy` and `Reader`.

  Parameters:
    `dataProxy` - the data proxy
    `reader` - the reader
    `remoteSort` - true to enable remote sort of the data

### GroupingStore

    public GroupingStore(DataProxy dataProxy,
                         Reader reader,
                         UrlParam[] baseParams,
                         SortState initialSortState,
                         boolean remoteSort)

  Create a Store using the specified configuration.

  Parameters:
    `dataProxy` - the data proxy
    `reader` - the reader
    `baseParams` - base params which are to be sent as parameters on any HTTP request. Used only for Http based proxies.
    `initialSortState` - the initial sort field name and direction
    `remoteSort` - true to enable remote sort

Method Detail

### clearGrouping

    public void clearGrouping()

  Clears any existing grouping and refreshes the data using the default sort.

### groupBy

    public void groupBy(java.lang.String field)

  Groups the data by the specified field.

  Parameters:
    `field` - The field name by which to sort the store's data

### groupBy

    public void groupBy(java.lang.String field,
                        boolean forceRegroup)

  Groups the data by the specified field.

  Parameters:
    `field` - The field name by which to sort the store's data
    `forceRegroup` - true to force the group to be refreshed even if the field passed in is the same as the current grouping field, false to skip grouping on the same field (defaults to false)

### setGroupField

    public void setGroupField(java.lang.String groupField)

  The field name by which to sort the store's data (defaults to '').

  Parameters:
    `groupField` - the group field

### setGroupOnSort

    public void setGroupOnSort(boolean groupOnSort)

  True to sort the data on the grouping field when a grouping operation occurs, false to sort based on the existing sort info (defaults to false).

  Parameters:
    `groupOnSort` - true to group on sort

### setRemoteGroup

    public void setRemoteGroup(boolean remoteGroup)

  True if the grouping should apply on the server side, false if it is local only (defaults to false). If the grouping is local, it can be applied immediately to the data. If it is remote, then it will simply act as a helper, automatically sending the grouping field name as the 'groupBy' param with each XHR call.

  Parameters:
    `remoteGroup` - true if the grouping should apply on the server side

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