PDA

View Full Version : XTemplate overwrite inside a Toolbar



ncooley527
16 Feb 2011, 8:02 PM
Hey all --

I'm attempting to use the sencha-touch MVC pattern and I'm trying to replace a View instance's toolbar html with that from a template using tpl.overwrite. Here's some code:



/* A short version of my view */
app.views.PAlert = Ext.extend(Ext.Sheet, {
dockedItems: [{
xtype: 'toolbar',
id: 'plrAlertTB',
html: '<here is the markup I want to replace>'
}]
});

/* instantiation of an instance of my plAlert */

var pAlert = new app.views.PAlert();

var tpl = new Ext.XTemplate(...);

So given the template "tpl", and the PAlert instance "pAlert", how can I reference the toolbar's HTML in a way that it can be replaced using "tpl.overwrite(<???>, data)"

Any pointers would be appreciated...

Thanks!