1. #1
    Ext User
    Join Date
    Oct 2007
    Location
    Hungary
    Posts
    136
    Vote Rating
    0
    slobo is on a distinguished road

      0  

    Default [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)

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    120
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    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

  3. #3
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    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();
        }
    });

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    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. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,835
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Fixed in SVN.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi