I am beginner in mobile application development. In order to start in sencha, I followed the simple tutorial http://jbkflex.wordpress.com/2012/06/18/creating-a-simple-list-in-sencha-touch-2-0/
I setup an IIS folder and add IIS AppPool\DefaultAppPool
user with full rights over created web application.
Well, I finished with writing the code (model, store and view) but when I tried to load html page, I have the following error in Chrome:
GET http://localhost/test/data/contact.json?_dc=1365970529423&page=1&start=0&limit=25 404 (Not Found)
But I have that json file: http://i.imgur.com/ANUS79C.png
Why the file is not loading ? Why just 404 ?
The full complete javascript code:
Ext.application({
name: 'Sencha',
launch: function() {
//creating our model
Ext.define('Contacts',{
extend:'Ext.data.Model',
config: {
fields:[
{name:'firstName' ,type:'string'},
{name:'lastName', type:'string'} ,
{name:'contactno', type:'string'},
{name:'address', type:'string'}
]
}
});
//creating our store
var contactStore = Ext.create('Ext.data.Store', {
model:'Contacts',
proxy:{
type:'ajax',
url:'data/contact.json',
reader:'json'
},
autoLoad:true
});
//console.log("Store: ", moviesStore.data);
//item template
var itemTemplate = new Ext.XTemplate(
'<tpl for=".">',
'{firstName} {lastName}',
'</tpl>'
);
//creating our List
var contactList = Ext.create('Ext.dataview.List',{
title: 'Contact List',
store: contactStore,
itemTpl: itemTemplate
});
//adding event to List
contactList.on("itemtap",function(dataView,index,target,record,e){
var first_name = record.data.firstName;
var last_name = record.data.lastName;
var contact = record.data.contactno;
var address = record.data.address;
Ext.Msg.alert("Contact: " + contact);
//console.log(record.data.firstName);
});
//adding List to Main UI - Tab Panel
Ext.create('Ext.tab.Panel',{
fullscreen:true,
items:[contactList]
});
}
});