Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Cached data won't be shown in the listgrid

    Hey,
    we've been working with dataSources very often. Recently i've tried to minimize the dataSource requests. I've found the cacheData attribute of the DataSource and used it to reduce the request at the creation of the dataSource components.
    At first i implemented this behaviour for the comboBoxes, and it did work just fine.
    Now i've been trying to implement it for listgrids and it doesn't work.
    None of the cached data, will be shown in the grid.
    Below you'll find a code example which the none working listgrid with cachedData.
    Code:
    isc.ListGrid.create({
    	ID : "countryList",
    	width : 500,
    	height : 224,
    	alternateRecordStyles : true,
    	/*autoFetchData: true,*/
    	dataSource : isc.DataSource.create({
    		"fields" :
    		[{
    				"name" : "term",
    				"type" : "text"
    			}
    		],
    		"dataFormat" : "json",
    		"useHttpProxy" : false,
    		"dataURL" : "http://www.corsproxy.com/www.openthesaurus.de/synonyme/search?q=aber&format=application/json",
    		"recordXPath" : "\/synsets[3]/terms",
    		"cacheData" : [{
    				"term" : "aber"
    			}, {
    				"term" : "abgesehen davon"
    			}, {
    				"term" : "abseits dessen",
    				"level" : "gehoben"
    			}, {
    				"term" : "allerdings"
    			}, {
    				"term" : "davon ab",
    				"level" : "umgangssprachlich"
    			}, {
    				"term" : "dessen ungeachtet"
    			}, {
    				"term" : "dies sei zugestanden",
    				"level" : "gehoben"
    			}, {
    				"term" : "freilich"
    			}, {
    				"term" : "gewiss"
    			}, {
    				"term" : "gleichwohl"
    			}, {
    				"term" : "immerhin"
    			}, {
    				"term" : "indes",
    				"level" : "gehoben"
    			}, {
    				"term" : "indessen"
    			}, {
    				"term" : "jedenfalls"
    			}, {
    				"term" : "jedoch"
    			}
    		]
    	}),
    
    })
    I've tested this with the latest smartclient 9.1 build
    regards
    marcus

    #2
    Per docs, the cacheData attribute applies only to a clientOnly:true DataSource.

    Comment

    Working...
    X