To a update a result set after a notification (onNew, onSet, and onDelete), widgets can call the updateResultSet method. Widgets can use the updated result sets to determine how to react to notifications, and how to update their displayed results based on changes.
This module will use the best available information to update result sets, using query attribute objects to determine if items are in a result set, and using the sort arrays to maintain sort information. However, queries can be opaque strings, and this module can not update results by itself in this case. In this situations, data stores can provide a isUpdateable(request) function and matchesQuery(item,request) function. If a data store can handle a query, it can return true from isUpdateable and if an item matches a query, it can return true from matchesQuery. Here is definition of isUpdateable and matchesQuery:
You can define a property on this object instance "cacheByDefault" to a value of true that will cause all queries to be cached by default unless the cache queryOption is explicitly set to false. This can be defined in the constructor options for ServiceStore/JsonRestStore and subtypes.
>To a update a result set after a notification (onNew, onSet, and onDelete), widgets can call the updateResultSet method. Widgets can use the updated result sets to determine how to react to notifications, and how to update their displayed results based on changes.This module will use the best available information to update result sets, using query attribute objects to determine if items are in a result set, and using the sort arrays to maintain sort information. However, queries can be opaque strings, and this module can not update results by itself in this case. In this situations, data stores can provide a isUpdateable(request) function and matchesQuery(item,request) function. If a data store can handle a query, it can return true from isUpdateable and if an item matches a query, it can return true from matchesQuery. Here is definition of isUpdateable and matchesQuery:
You can define a property on this object instance "cacheByDefault" to a value of true that will cause all queries to be cached by default unless the cache queryOption is explicitly set to false. This can be defined in the constructor options for ServiceStore/JsonRestStore and subtypes.
>See the dojox/data/ClientFilter reference documentation for more information.
Performs a query on the client side and returns the results as an array
Parameter | Type | Description |
---|---|---|
request | Object | See dojo/data/api/Read.fetch request |
baseResults | Array | This provides the result set to start with for client side querying |
Parameter | Type | Description |
---|---|---|
request | Object | |
baseResults | Array |
Returns whether the provide fetch arguments can be used to update an existing list
Parameter | Type | Description |
---|---|---|
request | Object | See dojo/data/api/Read.fetch request |
returns a comparator function for the given sort order array
Parameter | Type | Description |
---|---|---|
sort | undefined | See dojox.data.api.Read.fetch |
Parameter | Type | Description |
---|---|---|
item | undefined | |
request | undefined |
Determines whether the provided arguments are super/sub sets of each other
Parameter | Type | Description |
---|---|---|
argsSuper | undefined | Dojo Data Fetch arguments |
argsSub | undefined | Dojo Data Fetch arguments |
Attempts to update the given result set based on previous notifications
This will attempt to update the provide result based on previous notification, adding new items from onNew calls, removing deleted items, and updating modified items, and properly removing and adding items as required by the query and sort parameters.
Parameter | Type | Description |
---|---|---|
resultSet | Array | The result set array that should be updated |
request | Object | This object follows the same meaning as the keywordArgs passed to a dojo/data/api/Read.fetch. |