I am making an app in sencha 1 in which i am making a post request to server in datastore and then using that datastore in list .
But it is giving me the below

TypeError: Result of expression 'a' [undefined] is not an object. at file:///android_asset/www/touch/sencha-touch.js:6

my code is as follows:

Ext.setup( { tabletStartupScreen : 'tablet_startup.png',
phoneStartupScreen : 'phone_startup.png',
icon : 'icon.png',
glossOnIcon : false,


onReady : function() {
Ext.regModel('Principle', {
fields : [ 'name', 'type', 'id' ]
});


console.log("hi1");
var principleStore = new Ext.data.Store( {
autoLoad : true,
storeId : 'principleStore',
model : 'Principle',
sorters : 'name',
getGroupString : function(record) {
return record.get('name')[0];
},
proxy : {
type : 'ajax',
fields : [ 'name','pages', 'type', 'id' ],
url : 'http://apps.hds.com/ebook/apps_user_ebooks.jsp',
actionMethods: {
create: 'POST',
read: 'POST',
},
// method:'post',
params:{
username:username,
password:password
},
reader : {
type : 'json',
root : 'ebooks'
},success : function(result) {
console.log("success");
alert(result.responseText);
}
}


});
console.log("success");
alert(principleStore)
var principlesList = new Ext.List( {
itemId : 'principlesList',
store : principleStore,
renderTo : 'list',
itemTpl : '<div><strong>{name}</strong></div>',
singleSelect : true,
grouped : true,
indexBar : true,
simpleSelect : true,
floating : false,
height : 286,
width : 300,
centered : true,
hideOnMaskTap : false,
itemCls : 'item-select',
selectedItemCls : 'item-selected',
pressedCls : 'item-pressed',
listeners : {
itemtap : function(e, item) {
selectedItemName = this.store.data.items[item].data.name;
selectedItemId = this.store.data.items[item].data.id;
selectedItemtype = this.store.data.items[item].data.type;
}
}
});
if (Ext.is.Phone) {
} else {
}
principlesList.show();
}


});

Can anyone please tell me how to overcome this problem.

Thanks