PDA

View Full Version : Problem with template



Dmoney
22 Feb 2011, 3:58 PM
I have a template that I am trying to display in the west panel
I have a data store that contains a single record that I query from mysql with php.

But I can;t get the data to display in the panel.

here is how I'm trying to load the template:


var detailPanel = Ext.getCmp('detailPanel');
var tempRecord = notices.driverStore.getAt(0);
bookTpl.overwrite(detailPanel.body, tempRecord.data);

the error I get in firebug is tempRecord is undefined.

if I try this :


bookTpl.overwrite(detailPanel.body, notices,driverStore);

I get no errors the template displays but there is no data.

Can someone tell me what I am doing wrong?

Condor
23 Feb 2011, 6:26 AM
Loading is asynchronous. Are you waiting for the server to respond before you access the first record?