Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/store/Observable.js

  • Provides:

    • dojo.store.Observable
  • dojo.store.Observable

    • parameters:
      • store
    • summary
      The Observable store wrapper takes a store and sets an observe method on query()
      results that can be used to monitor results for changes.
    • description
      Observable wraps an existing store so that notifications can be made when a query
      is performed.
    • example
      Create a Memory store that returns an observable query, and then log some
      information about that query.
      
      	var store = dojo.store.Observable(new dojo.store.Memory({
      		data: [
      			{id: 1, name: "one", prime: false},
      			{id: 2, name: "two", even: true, prime: true},
      			{id: 3, name: "three", prime: true},
      			{id: 4, name: "four", even: true, prime: false},
      			{id: 5, name: "five", prime: true}
      		]
      	}));
      	var changes = [], results = store.query({ prime: true });
      	var observer = results.observe(function(object, previousIndex, newIndex){
      		changes.push({previousIndex:previousIndex, newIndex:newIndex, object:object});
      	});
      
      See the Observable tests for more information.
    • type
      Function
  • dojo.store

    • type
      Object
  • dojo

    • type
      Object