Namespacedojox.data

Additional dojo.data data stores and demos

Jump to PropertiesJump to ConstructorsNamespacesBack to top

Jump to PropertiesJump to NamespacesConstructorsBack to top

Constructor for the AtomRead store.
Constructordojox.data.CsvStore(keywordParameters: Object)
initializer
Initializer for the FlickrRestStore store.
Initializer for the FlickrStore store.
Initializer for the HTML table store.
jsonPathStore constructor, instantiate a new jsonPathStore Takes a single optional parameter in the form of a Javascript object containing one or more of the following properties. data: /*JSON String*/ || /* Javascript Object */, JSON String or Javascript object this store will control JSON is converted into an object, and an object passed to the store will be used directly. If no data and no url is provide, an empty object, {}, will be used as the initial store. url: /* string url */ Load data from this url in JSON format and use the Object created from the data as the data source. indexOnLoad: /* boolean */ Defaults to true, but this may change in the near future. Parse the data object and set individual objects up as appropriate. This will add meta data and assign id's to objects that dont' have them as defined by the idAttribute option. Disabling this option will keep this parsing from happening until a query is performed at which time only the top level of an item has meta info stored. This might work in some situations, but you will almost always want to indexOnLoad or use another option which will create an index. In the future we will support a generated index that maps by jsonPath allowing the server to take some of this load for larger data sets. idAttribute: /* string */ Defaults to '_id'. The name of the attribute that holds an objects id. This can be a preexisting id provided by the server. If an ID isn't already provided when an object is fetched or added to the store, the autoIdentity system will generate an id for it and add it to the index. There are utility routines for exporting data from the store that can clean any generated IDs before exporting and leave preexisting id's in tact. metaLabel: /* string */ Defaults to '_meta' overrides the attribute name that is used by the store for attaching meta information to an object while in the store's control. Defaults to '_meta'. hideMetaAttributes: /* boolean */ Defaults to False. When enabled, calls to getAttributes() will not include the meta attribute. autoIdPrefix: /*string*/ Defaults to "_auto_". This string is used as the prefix to any objects which have a generated id. A numeric index is appended to this string to complete the ID mode: dojox.data.ASYNC_MODE || dojox.data.SYNC_MODE Defaults to ASYNC_MODE. This option sets the default mode for this store. Sync calls return their data immediately from the calling function instead of calling the callback functions. Functions such as fetchItemByIdentity() and fetch() both accept a string parameter in addtion to the normal keywordArgs parameter. When passed this option, SYNC_MODE will automatically be used even when the default mode of the system is ASYNC_MODE. A normal request to fetch or fetchItemByIdentity (with kwArgs object) can also include a mode property to override this setting for that one request.
JsonRestStore constructor, instantiate a new JsonRestStore A JsonRestStore can be configured from a JSON Schema. Queries are just passed through as URLs for XHR requests, so there is nothing to configure, just plug n play. Of course there are some options to fiddle with if you want: jsonSchema: /* object */ service: /* function */ This is the service object that is used to retrieve lazy data and save results The function should be directly callable with a single parameter of an object id to be loaded The function should also have the following methods: put(id,value) - puts the value at the given id post(id,value) - posts (appends) the value at the given id delete(id) - deletes the value corresponding to the given id
Constructordojox.data.KeyValueStore(keywordParameters: Object)
constructor
Constructordojox.data.OpmlStore(keywordParameters: Object)
constructor
Initializer for the PicasaStore store.
This class provides a store that is mainly intended to be used for loading data dynamically from the server, used i.e. for retreiving chunks of data from huge data stores on the server (by server-side filtering!). Upon calling the fetch() method of this store the data are requested from the server if they are not yet loaded for paging (or cached). For example used for a combobox which works on lots of data. It can be used to retreive the data partially upon entering the letters "ac" it returns only items like "action", "acting", etc. note: The field name "id" in a query is reserved for looking up data by id. This is necessary as before the first fetch, the store has no way of knowing which field the server will declare as identifier. examples: // The parameter "query" contains the data that are sent to the server. var store = new dojox.data.QueryReadStore({url:'/search.php'}); store.fetch({query:{name:'a'}, queryOptions:{ignoreCase:false}}); // Since "serverQuery" is given, it overrules and those data are // sent to the server. var store = new dojox.data.QueryReadStore({url:'/search.php'}); store.fetch({serverQuery:{name:'a'}, queryOptions:{ignoreCase:false}}); <div dojoType="dojox.data.QueryReadStore" jsId="store2" url="../tests/stores/QueryReadStore.php" requestMethod="post"></div> <div dojoType="dojox.grid.data.DojoData" jsId="model2" store="store2" sortFields="[{attribute: 'name', descending: true}]" rowsPerPage="30"></div> <div dojoType="dojox.Grid" id="grid2" model="model2" structure="gridLayout" style="height:300px; width:800px;"></div> todo: - there is a bug in the paging, when i set start:2, count:5 after an initial fetch() and doClientPaging:true it returns 6 elemetns, though count=5, try it in QueryReadStore.html - add optional caching - when the first query searched for "a" and the next for a subset of the first, i.e. "ab" then we actually dont need a server request, if we have client paging, we just need to filter the items we already have that might also be tooo much logic
Initialize a SnapLogicStore object.
Constructordojox.data.XmlItem(element, store)
Initialize with an XML element
Constructor for the XML store.

Jump to ConstructorsJump to NamespacesPropertiesBack to top