View Full Version : how to render toolbar in a template

5 Jun 2012, 6:54 AM
var rolestpl = new Ext.XTemplate(
'<tpl for=".">',
'<div class="roles">',
'<div class="rolesheading">{rolesHeading} <span>({roleValue})</span></div>',
'<div id="xyz">{[new Ext.ux.toolbar({id:"abc",buttonIcon:"add,import,export"})]}</div>',
'<div class="rolesList">',
'<tpl for="userList">',

this is rendering [object object] in html.how toolbar render in it.

7 Jun 2012, 1:31 PM
May want to look at this: http://skirtlesden.com/ux/ctemplate

7 Jun 2012, 11:12 PM

You can Create the toolbar in any event that you want may be afterRender or any button click

var toolbar = new Ext.Toolbar({
renderTo: 'xyz' //xyz is the id of the element of Template ,where u want this toolbar
, items: [
text: 'click me'

var myTpl = new Ext.XTemplate(
'<div id="xyz"></div>',
return myTpl;