General Interface is an open source project hosted by the Dojo Foundation

Accessing Dojo Data from General Interface

Dojo data stores can be used in General Interface through their native API or via a CDF interface provided by jsx3.xml.DojoDataStore.

To access a Dojo data store via a CDF interface, create an instance of jsx3.xml.DojoDataStore and set its store and the query that retrieves the data from the source, as in the following example:

var cdf = jsx3.xml.DojoDataStore();
cdf.setStore(new dojox.data.JsonRestStore({target:"/RestData"});
cdf.setQuery("?price<10");
var recordIds = cdf.getRecordIds();
var firstRecord = cdf.getRecord(recordIds[0]);
jsx3.xml.DojoDataStore is not a descendant of class jsx3.xml.Document, so it cannot be used directly as the data source of Matrix and other descendants of jsx3.xml.Cacheable. To use a Dojo data source to populate a Matrix, first construct an XML document by iterating over the records in a DojoDataStore instance.

Contents

Searching General Interface Docs

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.