public class FilteredList extends ResultSet
ResultSet
designed to provide a synchronously filterable List interface
for an array of data. Developers should set allRows
to the
full set of data objects, and use criteria
to the apply criteria
to the data set. Standard List APIs such as List.get()
, List.getLength()
, List.getRange()
, etc will then allow access to a filtered subset of this data.
The dataSource
attribute may be used to specify the format of records
to be stored within this list, but this is not required. If no DataSource is explicitly specified, filteredList will
automatically generate its own DataSource with dropUnknownCriteria
set to false.
RecordList.SortNormalizer
jsObj
config, configOnly, factoryCreated, factoryProperties, id, scClassName
Constructor and Description |
---|
FilteredList() |
FilteredList(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.core.client.JavaScriptObject |
create() |
Record[] |
getAllRows()
Complete set of records for this filteredList.
|
DataSource |
getDataSource()
Optional dataSource to specifying field names and types for records within this List.
|
boolean |
getModifiable()
When true, allows the ResultSet to be modified by list APIs
List.addAt() ,
List.set() , and List.removeAt() . |
static FilteredList |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
void |
invalidateCache()
Invoking invalidateCache() will have no effect on a filteredList.
|
FilteredList |
setAllRows(Record... allRows)
Complete set of records for this filteredList.
|
FilteredList |
setDataSource(DataSource dataSource)
Optional dataSource to specifying field names and types for records within this List.
|
FilteredList |
setModifiable(boolean modifiable)
When true, allows the ResultSet to be modified by list APIs
List.addAt() ,
List.set() , and List.removeAt() . |
addDataArrivedHandler, allMatchingRowsCached, allRowsCached, applyFilter, applyFilter, asSGWTComponent, compareCriteria, compareCriteria, compareCriteria, dataArrived, ensureCreated, fetchRowCount, fetchRowCount, fetchRowCount, filterLocalData, find, find, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findByKey, findByKey, findIndex, findIndex, findIndex, findIndex, findIndex, findIndex, findIndex, findNextIndex, findNextIndex, findNextIndex, findNextIndex, findNextIndex, findNextIndex, findNextIndex, get, getAllCachedRows, getAllVisibleRows, getAlwaysRequestVisibleRows, getApplyRowCountToLength, getAutoFetchRowCount, getBlockingRowCountFetch, getCachedRange, getCombinedCriteria, getCombinedCriteriaAsAdvancedCriteria, getCriteria, getCriteriaPolicy, getDisableCacheSync, getDropCacheOnUpdate, getFetchDelay, getFetchMode, getFetchOperation, getImplicitCriteria, getLength, getLoadingMarker, getNeverDropUpdatedRows, getPaletteDefaults, getPrerequisiteFieldGenerationNotSuccessfulErrorMessage, getProgressiveLoading, getProperty, getRange, getRangeAsRecordList, getReapplyUnchangedLocalFilter, getRememberDynamicProgressiveLoading, getRequestProperties, getResultSize, getRowCount, getRowCountContext, getRowCountOperation, getRowCountRange, getRowCountStatus, getSort, getUpdateCacheFromRequest, getUpdatePartialCache, getUseClientFiltering, getUseClientSorting, getValueMap, indexOf, indexOf, indexOf, indexOf, indexOf, isResultSet, lengthIsKnown, lengthIsProgressive, rangeIsLoaded, resort, rowIsLoaded, setAlwaysRequestVisibleRows, setApplyRowCountToLength, setAutoFetchRowCount, setBlockingRowCountFetch, setCriteria, setCriteriaPolicy, setDisableCacheSync, setDropCacheOnUpdate, setFetchDelay, setFetchMode, setFetchOperation, setFullLength, setImplicitCriteria, setInitialData, setInitialLength, setInitialSort, setJavaScriptObject, setNeverDropUpdatedRows, setPrerequisiteFieldGenerationNotSuccessfulErrorMessage, setProgressiveLoading, setReapplyUnchangedLocalFilter, setRememberDynamicProgressiveLoading, setRequestProperties, setResultSize, setRowCountContext, setRowCountOperation, setSort, setSortSpecifiers, setUpdateCacheFromRequest, setUpdatePartialCache, setUseClientFiltering, setUseClientSorting, sortByProperty, sortByProperty, sortByProperty, unsort, usingFilteredData, willFetchData, willFetchData
add, addAt, addDataChangedHandler, addList, addList, addListAt, contains, contains, containsAll, duplicate, equals, find, find, find, find, findIndex, findNextIndex, findNextIndex, findNextIndex, first, getItems, getJsObj, getOrCreateJsObj, getRangeList, intersect, isARecordList, isCreated, isEmpty, last, lastIndexOf, lastIndexOf, remove, removeAt, removeList, set, setLength, setSort, sort, sort, sortByProperty, toArray
addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
public FilteredList()
public FilteredList(com.google.gwt.core.client.JavaScriptObject jsObj)
public static FilteredList getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public com.google.gwt.core.client.JavaScriptObject create()
public FilteredList setAllRows(Record... allRows) throws java.lang.IllegalStateException
allRows
at run time.
Note : This is an advanced setting
setAllRows
in class ResultSet
allRows
- New set of unfiltered cache data. Default value is []FilteredList
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic Record[] getAllRows()
getAllRows
in class ResultSet
public FilteredList setDataSource(DataSource dataSource) throws java.lang.IllegalStateException
allRows
, this filteredList
will not issue fetch requests against this DataSource. If no DataSource was explicitly specified, filteredList will
automatically generate its own DataSource with dropUnknownCriteria
set to false.
setDataSource
in class ResultSet
dataSource
- New dataSource value. Default value is nullFilteredList
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdDataBinding
,
DataSource fields Examplepublic DataSource getDataSource()
allRows
, this filteredList
will not issue fetch requests against this DataSource. If no DataSource was explicitly specified, filteredList will
automatically generate its own DataSource with dropUnknownCriteria
set to false.
getDataSource
in class ResultSet
DataBinding
,
DataSource fields Examplepublic FilteredList setModifiable(boolean modifiable)
List.addAt()
,
List.set()
, and List.removeAt()
. Only applies to fetchMode
:"local"
ResultSets, since in all other cases, such modifications would break the consistency of server and client row numbering
needed for data paging, and also create some issues with automatic cache synchronization. See the "Modifying
ResultSets" subtopic in the ResultSet Overview
for the alternative approach
of updating the DataSource
. One known case where modification can be useful is when
an array has been passed to ListGrid.setData()
for a ListGrid
with ListGrid.filterLocalData
:true. If the data is
filtered using the filterEditor
, then a new local
ResultSet will be created as data
to reflect the filtering.
setModifiable
in class ResultSet
modifiable
- New modifiable value. Default value is trueFilteredList
instance, for chaining setter callsDataSource.addData(com.smartgwt.client.data.Record)
,
DataSource.removeData(com.smartgwt.client.data.Record)
,
DataSource.updateCaches(com.smartgwt.client.data.DSResponse)
public boolean getModifiable()
List.addAt()
,
List.set()
, and List.removeAt()
. Only applies to fetchMode
:"local"
ResultSets, since in all other cases, such modifications would break the consistency of server and client row numbering
needed for data paging, and also create some issues with automatic cache synchronization. See the "Modifying
ResultSets" subtopic in the ResultSet Overview
for the alternative approach
of updating the DataSource
. One known case where modification can be useful is when
an array has been passed to ListGrid.setData()
for a ListGrid
with ListGrid.filterLocalData
:true. If the data is
filtered using the filterEditor
, then a new local
ResultSet will be created as data
to reflect the filtering.
getModifiable
in class ResultSet
DataSource.addData(com.smartgwt.client.data.Record)
,
DataSource.removeData(com.smartgwt.client.data.Record)
,
DataSource.updateCaches(com.smartgwt.client.data.DSResponse)
public void invalidateCache()
setAllRows()
.invalidateCache
in class ResultSet