-
29 Dec 2007 1:24 PM #1
[FIXED][2.x] DataView tpl config option bug
[FIXED][2.x] DataView tpl config option bug
the DataView's tpl config option
does not accept an array of strings (HTML fragments)
as stated in the docs
(can only accept a string or an XTemplate - this can also clearly be seen from the source code of DataView)
(I think this should be handled as a programming bug, not as a docs problem)
-
11 Jan 2008 10:04 AM #2
slobo -
Thanks for the bug report. We've added this into our issue tracker and will take a look at it.
Thanks,Aaron Conran
@aconran
Sencha Architect Development Team
-
28 Oct 2008 7:13 PM #3
this bug's still present in 2.2.
bugfix for this is trivial:
Code:Ext.override(Ext.DataView, { // private initComponent : function() { Ext.DataView.superclass.initComponent.call(this); if (typeof this.tpl == "string" || Ext.type(this.tpl) == "array") { this.tpl = new Ext.XTemplate(this.tpl); } this.addEvents( "beforeclick", "click", "mouseenter", "mouseleave", "containerclick", "dblclick", "contextmenu", "selectionchange", "beforeselect" ); this.all = new Ext.CompositeElementLite(); this.selected = new Ext.CompositeElementLite(); } });
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
29 Oct 2008 12:39 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Maybe, instead, we should check if it is not a usable template class:
Code:Ext.override(Ext.DataView, { initComponent : function(){ Ext.DataView.superclass.initComponent.call(this); if(this.tpl && !this.tpl.overwrite){ this.tpl = new Ext.XTemplate(this.tpl); } this.addEvents( "beforeclick", "click", "mouseenter", "mouseleave", "containerclick", "dblclick", "contextmenu", "selectionchange", "beforeselect" ); this.all = new Ext.CompositeElementLite(); this.selected = new Ext.CompositeElementLite(); } });
-
5 Feb 2009 8:00 PM #5
Fixed in SVN.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!


Reply With Quote