PDA

View Full Version : header config option doesn't work for Ext.Window



Jangla
3 Oct 2013, 5:28 AM
Example code : http://jsfiddle.net/therealjamesg/M69BU/

I'm trying to create a window that has a slightly more "rich" header than just standard title text. In my particular case, it would be a small thumbnail image and a couple of lines of text driven from a record and a tpl.

The docs say the header attribute can handle a config object including an xtype:

http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.window.Window-cfg-header

But in reality this just doesn't work.

Bug or am I implementing this wrong?

ettavolt
3 Oct 2013, 9:49 PM
Instead of changing xtype of a header you can change 'headingTpl' config - that will affect title component (the one that displays text).

Jangla
3 Oct 2013, 11:32 PM
Instead of changing xtype of a header you can change 'headingTpl' config - that will affect title component (the one that displays text).
Good idea. I will give that a go and come back with results.

So, is this a bug?

Jangla
3 Oct 2013, 11:56 PM
Doesn't work. You can't override the renderData that gets applied to the headingTpl so you can't change the data in there anyway.

ettavolt
6 Oct 2013, 9:54 PM
Have you tried passing data object as title?