Threaded View
-
3 Nov 2012 10:02 AM #1
Panel header does not honor tpl config
Panel header does not honor tpl config
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.1
- Ext 4.1.1 rev a
- Safari 6.0.1
- Chrome 22.0.1229.94
- HTML5
- I want to change how a panel header is rendered. According to the documentation, I should be able to specify a tpl config. Unfortunately, the header class does not honor it and instead favors the private headingTpl property.
- Create a panel.
- Give it a header config.
- In the header config, provide a tpl config that prints "foo" before and after the title.
- The panel header displays as "foo panel 1 foo".
- The panel header displays as just "panel 1".
PHP Code:Ext.create('Ext.Panel', {
title: 'Example',
width: 300,
height: 400,
renderTo: Ext.getBody(),
defaults: {
height: 100,
width: 300
},
items: [
{
xtype: 'panel',
region: 'center',
title: 'panel 1',
html: 'panel 1',
collapsible: true,
header: {
// change to headingTpl to make it work
tpl: '<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">foo {title} foo</span>'
}}
]
});
HELPFUL INFORMATION
See this URL for live test case:
http://jsfiddle.net/BYehp/
Debugging already done:- Changing the header config to use headingTpl instead of tpl works. However, headingTpl is listed as a private member.
- not provided
- only default ext-all.css
- OS X 10.8.2
- Windows 7 Pro SP1
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote