PDA

View Full Version : Data Store issues and also this.addEvents is not a function error



luisparada
26 Apr 2011, 6:22 PM
I have try really hard to find an issue that is not allowing me to feed an Ext.data.Store for show a list of items. I need help here, I'm using android for testing. This is the store definition:
File: stores.js


wayne.stores.wayneEvents = new Ext.data.Store({
model:'wayne.models.Events',
proxy:{
type:'ajax',
url:'response.json',
extraParams:{
start:0,
end:5,
module:'events',
task:'getEvents'
},
reader:{
root:'rows'
}
},
autoLoad: true
})

This is the model
file: model.js


Ext.regModel("wayne.models.Events",{
fields:[
{name:'id', type:'int'},
{name: 'title', type:'string'},
{name:'eventtime', type:'string'}
]
});


This is the json respond:
file:module.php


{"rows":[{"row":{"name":"Barn Restaurant Shops"}},{"row":{"name":"Books In Stock Used & Rare"}},{"row":{"name":"Antique Warehouse"}},{"row":{"name":"FRIENDTIQUE"}},{"row":{"name":"Gallery in the Vault"}},{"row":{"name":"Days Inn Wooster"}},{"row":{"name":"Best Western Wooster Plaza"}},{"row":{"name":"The Cabin at Sassafras Knoll"}},{"row":{"name":"Econo Lodge Wooster"}},{"row":{"name":"Arby's"}}]}