Hi guys,
I got a list which gets its data from a jsonp proxy. For example I get 3 items. Item1, Item2 and Item3.
What I want is that by default a fourth item exists which is named "Please select". Because I don't want to change the webservice, I thought, that I put the 4th item into the data-property and set ClearOnPageLoad to false. But that does not work. The item gets removed when the data comes in... Here is my config:
Code:
Ext.define('IP.store.base.TestStore', { extend: 'Ext.data.Store',
requires: [
'IP.model.TestModel'
],
config: {
autoLoad: true,
clearOnPageLoad: false,
data: [
{
id: 0,
name: 'Please select'
}
],
model: 'IP.model.TestModel',
storeId: 'TestStore',
proxy: {
type: 'jsonp',
url: 'http://localhost/GetData',
reader: {
type: 'json',
idProperty: 'id',
root: 'data'
}
}
}
});
The ids of item1-3 got the values 1, 2 and 3.
Any hints, why the default-item get removed?
Thanks 