sachin sachdeva
29 Apr 2011, 7:37 AM
Hi... I am using script tag proxy for domain other then my application i have used it exactly in the same way as used in example..my code is..
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady : function() {
Ext.regModel('Contact', {
fields: ['firstName', 'lastName']
});
var groupingBase = {
itemTpl: '<div class="contact2"><strong>{firstName}</strong> {lastName}</div>',
selModel: {
mode: 'SINGLE',
allowDeselect: true
},
grouped: true,
indexBar: false,
onItemDisclosure: {
scope: 'test',
handler: function(record, btn, index) {
alert('Disclose more info for ' + record.get('firstName'));
}
},
store: new Ext.data.Store({
model: 'Contact',
proxy : {
type : 'scripttag',
url : 'http://wwwdev.XXX.com/ebook/app_admin_ebooks.json',
reader : {
type : 'json'
}
},
autoLoad : true
})
};
debugger;
if (!Ext.is.Phone) {
new Ext.List(Ext.apply(groupingBase, {
floating: true,
width: 350,
height: 370,
centered: true,
modal: true,
hideOnMaskTap: false
})).show();
}
else {
new Ext.List(Ext.apply(groupingBase, {
fullscreen: true
}));
}
}
});
My json is
data: [
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Ed', lastName: 'Spencer'}
]
Plz let me know where i am mistaken ..i am new to sencha touch.
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady : function() {
Ext.regModel('Contact', {
fields: ['firstName', 'lastName']
});
var groupingBase = {
itemTpl: '<div class="contact2"><strong>{firstName}</strong> {lastName}</div>',
selModel: {
mode: 'SINGLE',
allowDeselect: true
},
grouped: true,
indexBar: false,
onItemDisclosure: {
scope: 'test',
handler: function(record, btn, index) {
alert('Disclose more info for ' + record.get('firstName'));
}
},
store: new Ext.data.Store({
model: 'Contact',
proxy : {
type : 'scripttag',
url : 'http://wwwdev.XXX.com/ebook/app_admin_ebooks.json',
reader : {
type : 'json'
}
},
autoLoad : true
})
};
debugger;
if (!Ext.is.Phone) {
new Ext.List(Ext.apply(groupingBase, {
floating: true,
width: 350,
height: 370,
centered: true,
modal: true,
hideOnMaskTap: false
})).show();
}
else {
new Ext.List(Ext.apply(groupingBase, {
fullscreen: true
}));
}
}
});
My json is
data: [
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Ed', lastName: 'Spencer'}
]
Plz let me know where i am mistaken ..i am new to sencha touch.