PDA

View Full Version : data not display in list from server



maulik
24 Jan 2011, 3:32 AM
hi.. all... i m new in sencha.. my problem is that i want to display data in list from server.. but i cant dispaly data in list..
i dint where i was wrong... here is my code..

.html file..

<link rel="stylesheet" href="lib/touch/resources/css/sencha-touch-debug.css" type="text/css"/>
<script type="text/javascript" src="lib/touch/sencha-touch-debug-w-comments.js"></script>

<script type="text/javascript" src="lib/touch/docs/resources/ext-base.js"></script>
<script type="text/javascript" src="lib/touch/docs/resources/ext-all.js"></script>

<link rel="stylesheet" href="sencha-touch.css" type="text/css"/>
<script type="text/javascript" src="sencha-touch.js"></script>


<script type="text/javascript" src="Status2.js"></script>

.js file

Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function()
{
var ds;

alert("Create DataBase");


ds = new Ext.data.Store({
autoLoad: true,
model:'status',
proxy: new Ext.data.HttpProxy({
url: 'url of server',
method: 'GET'
}),
reader: new Ext.data.JsonReader({
totalProperty: 'totalCount',
id: 'linie',
root: 'result',
fields:['linie','status']
}),
listeners: {'load': function ()
{
ds.each(function(r) {
alert(r.data['linie']);
});
}
},
getGroupString : function(record) {
return record.get('linie')[0];
}
});



Model*/Ext.regModel('Status', {
fields: ['linie', 'Status']
});

var list = new Ext.List({
fullscreen: true,
singleSelect : true,
itemTpl : '{linie} - {Status}',
//grouped : true,
indexBar: true,
store: ds,
});


var dockedList = [{
xtype: 'tabpanel',
dock: 'center',
fullscreen: true,
items:[{
title: 'Status',
html: '<p>test 1</p>',
dockedItems:list
},
{
title: 'News',
html: '<p>test 2</p>'

}]
}]

var appPanel = new Ext.Panel({
id: 'appPanel',
fullscreen: true,
dockedItems: dockedList
});

}
});

can anyone help me???

still i cant able to display data in list...

thanx in advance... waing for your rply...

thanx again...