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

dojox/data/QueryReadStore.js

  • Provides:

    • dojox.data.QueryReadStore
  • Requires:

    • dojo.string in common
  • dojox.data.QueryReadStore

    • type
      Function
    • parameters:
      • params: (typeof Object)
    • summary
      By default all the sorting is done serverside before the data is returned
      which is the proper place to be doing it for really large datasets.
    • example
      	// 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>
  • dojox.data.QueryReadStore.url

    • type
      String
  • dojox.data.QueryReadStore.requestMethod

    • type
      String
  • dojox.data.QueryReadStore._className

    • type
      String
  • dojox.data.QueryReadStore._items

    • type
      Array
  • dojox.data.QueryReadStore._lastServerQuery

    • type
      Object
  • dojox.data.QueryReadStore._numRows

    • type
      Number
  • dojox.data.QueryReadStore.lastRequestHash

    • type
      String
  • dojox.data.QueryReadStore.doClientPaging

    • type
      bool
  • dojox.data.QueryReadStore.doClientSorting

    • type
      bool
  • dojox.data.QueryReadStore._itemsByIdentity

    • type
      Object
  • dojox.data.QueryReadStore._identifier

    • type
      Object
  • dojox.data.QueryReadStore._features

    • type
      Object
  • dojox.data.QueryReadStore._features.dojo.data.api.Read

    • type
      Object
  • dojox.data.QueryReadStore._features.dojo.data.api.Identity

    • type
      Object
  • dojox.data.QueryReadStore._labelAttr

    • type
      String
  • dojox.data.QueryReadStore.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • params: (typeof Object)
  • dojox.data.QueryReadStore.getValue

    • parameters:
      • item: (typeof item)
      • attribute: (typeof attribute-name-string)
      • defaultValue: (typeof value)
    • type
      Function
  • dojox.data.QueryReadStore.getValues

    • parameters:
      • item: (typeof item)
      • attribute: (typeof attribute-name-string)
    • type
      Function
  • dojox.data.QueryReadStore.getAttributes

    • parameters:
      • item: (typeof item)
    • type
      Function
  • dojox.data.QueryReadStore.hasAttribute

    • parameters:
      • item: (typeof item)
      • attribute: (typeof attribute-name-string)
    • summary
      See dojo.data.api.Read.hasAttribute()
    • type
      Function
  • dojox.data.QueryReadStore.containsValue

    • parameters:
      • item: (typeof item)
      • attribute: (typeof attribute-name-string)
      • value: (typeof anything)
    • type
      Function
  • dojox.data.QueryReadStore.isItem

    • parameters:
      • something: (typeof anything)
    • type
      Function
  • dojox.data.QueryReadStore.isItemLoaded

    • parameters:
      • something: (typeof anything)
    • type
      Function
  • dojox.data.QueryReadStore.loadItem

    • parameters:
      • args: (typeof object)
    • type
      Function
  • dojox.data.QueryReadStore.fetch

    • parameters:
      • request: (typeof Object)
    • returns
      Object
    • summary
      See dojo.data.util.simpleFetch.fetch() this is just a copy and I adjusted
      only the paging, since it happens on the server if doClientPaging is
      false, thx to http://trac.dojotoolkit.org/ticket/4761 reporting this.
      Would be nice to be able to use simpleFetch() to reduce copied code,
      but i dont know how yet. Ideas please!
    • type
      Function
  • dojox.data.QueryReadStore.getFeatures

    • type
      Function
  • dojox.data.QueryReadStore.close

    • parameters:
      • request: (typeof dojo.data.api.Request)
        || keywordArgs || null
    • type
      Function
  • dojox.data.QueryReadStore.getLabel

    • parameters:
      • item: (typeof item)
    • returns
      String|undefined
    • summary
      See dojo.data.api.Read.getLabel()
    • type
      Function
  • dojox.data.QueryReadStore.getLabelAttributes

    • parameters:
      • item: (typeof item)
    • returns
      array|null
    • summary
      See dojo.data.api.Read.getLabelAttributes()
    • type
      Function
  • dojox.data.QueryReadStore._xhrFetchHandler

    • parameters:
      • data
      • request
      • fetchHandler
      • errorHandler
    • type
      Function
  • dojox.data.QueryReadStore._fetchItems

    • parameters:
      • request
      • fetchHandler
      • errorHandler
    • summary
      The request contains the data as defined in the Read-API.
      Additionally there is following keyword &quot;serverQuery&quot;.
      
      The *serverQuery* parameter, optional.
      This parameter contains the data that will be sent to the server.
      If this parameter is not given the parameter &quot;query&quot;'s
      data are sent to the server. This is done for some reasons:
      - to specify explicitly which data are sent to the server, they
      might also be a mix of what is contained in &quot;query&quot;, &quot;queryOptions&quot;
      and the paging parameters &quot;start&quot; and &quot;count&quot; or may be even
      completely different things.
      - don't modify the request.query data, so the interface using this
      store can rely on unmodified data, as the combobox dijit currently
      does it, it compares if the query has changed
      - request.query is required by the Read-API
      
      I.e. the following examples might be sent via GET:
      fetch({query:{name:&quot;abc&quot;}, queryOptions:{ignoreCase:true}})
      the URL will become:   /url.php?name=abc
      
      fetch({serverQuery:{q:&quot;abc&quot;, c:true}, query:{name:&quot;abc&quot;}, queryOptions:{ignoreCase:true}})
      the URL will become:   /url.php?q=abc&amp;c=true
      // The serverQuery-parameter has overruled the query-parameter
      // but the query parameter stays untouched, but is not sent to the server!
      // The serverQuery contains more data than the query, so they might differ!
    • type
      Function
  • dojox.data.QueryReadStore._filterResponse

    • parameters:
      • data: (typeof The)
        data received from server
    • summary
      If the data from servers needs to be processed before it can be processed by this
      store, then this function should be re-implemented in subclass. This default
      implementation just return the data unchanged.
    • type
      Function
  • dojox.data.QueryReadStore._assertIsItem

    • parameters:
      • item: (typeof item)
        The item to test for being contained by the store.
    • summary
      It throws an error if item is not valid, so you can call it in every method that needs to
      throw an error when item is invalid.
    • type
      Function
  • dojox.data.QueryReadStore._assertIsAttribute

    • parameters:
      • attribute: (typeof attribute-name-string)
        The attribute to test for being contained by the store.
    • summary
      This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
    • type
      Function
  • dojox.data.QueryReadStore.fetchItemByIdentity

    • parameters:
      • keywordArgs: (typeof Object)
    • summary
      See dojo.data.api.Identity.fetchItemByIdentity()
    • type
      Function
  • dojox.data.QueryReadStore.getIdentity

    • parameters:
      • item: (typeof item)
    • summary
      See dojo.data.api.Identity.getIdentity()
    • type
      Function
  • dojox.data.QueryReadStore.getIdentityAttributes

    • parameters:
      • item: (typeof item)
    • summary
      See dojo.data.api.Identity.getIdentityAttributes()
    • type
      Function
  • dojox.data

    • type
      Object
  • dojox

    • type
      Object