PDA

View Full Version : XTemplate, Dataview and IE7



rebeccapeltz
18 Feb 2011, 1:01 PM
I'm using XTemplate and Dataview and it's working great in Chrome but I get an error in IE 7.
Here are the pieces - I've shortened the Xtemplate. The error I get in IE is running through code that is not execute in Chrome. It tells me I have an undefined Path at line 1078 (v.3.2,1). This is processing a 'jsSelect'. Is there something special I need to do for IE? Can you help me figure out why I'm getting the error? This panel containing this is being rendered in a window that I am opening (see config below). Would that make a difference for IE?


var spinalTpl = new Ext.XTemplate(
'<tpl for=".">',
'<p>Date of Spinal Team Evaluation: {evalDate}</p>',
'</tpl>'
);


var spinalDV = new Ext.DataView({
id:'spinalDV',
store: spinalStore,
autoHeight: true,
tpl: spinalTpl
});


spinalPanel = new Ext.Panel({
id: 'pnlSpinalPrecaution',
frame: true,
layout: 'fit',
height: 500,
autoScroll: true,
collapsible: false,
title: '',
items: spinalDV
});


var recWin = new Ext.Window({
id: 'spinalRecWin',
layout: 'fit',
modal: true,
width: 600,
height: 450,
closeAction: 'hide',
title: 'Spinal Precaution - Additional Information',
items: [spinalPanel]
});

rebeccapeltz
18 Feb 2011, 1:40 PM
seems to be fixed with the following by explicitly converting the template to a string


spinalTpl.compile();
var spinalHtml = spinalTpl.apply(spinalStore.getAt(0).data);
var spinalDV = new Ext.DataView({
id:'spinalDV',
store: spinalStore,
autoHeight: true,
tpl: spinalTpl
});