Results 1 to 5 of 5

Thread: Feature Request for Ext.view.TableChunker

    You found a bug! We've classified it as EXTJS-5471 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member harrydeluxe's Avatar
    Join Date
    Jul 2007
    Location
    Nürnberg, Germany
    Posts
    80

    Default Feature Request for Ext.view.TableChunker

    So Features can change the 'metaTableTpl', the folowing lines in Ext.view.TableChunker would be very helpful. For example: http://harrydeluxe.github.com/extjs-.../tileview.html

    Ext.view.TableChunker
    PHP Code:
    getTableTpl: function(cfgtextOnly) {
    var 
    tpl,
            
    tableTplMemberFns = {
                
    openRowsthis.openRows,
                
    closeRowsthis.closeRows,
                
    embedFeaturethis.embedFeature,
                
    embedFullWidththis.embedFullWidth,
                
    openTableWrapthis.openTableWrap,
                
    closeTableWrapthis.closeTableWrap
            
    },
            
    tplMemberFns = {},
            
    features cfg.features || [],
            
    ln features.length,
            
    i  0,
            
    memberFns = {
                
    embedRowClsthis.embedRowCls,
                
    embedRowAttrthis.embedRowAttr,
                
    firstOrLastClsthis.firstOrLastCls
            
    },
        
            
    // copy the default
            
    metaRowTpl = Array.prototype.slice.call(this.metaRowTpl0),

            
    metaTableTpl = Array.prototype.slice.call(this.metaTableTpl0); // new
        
            
        
    for (; lni++) {
            if (!
    features[i].disabled) {
                
    features[i].mutateMetaTableTpl(metaTableTpl); // new
                
    features[i].mutateMetaRowTpl(metaRowTpl);
                
    Ext.apply(memberFnsfeatures[i].getMetaRowTplFragments());
                
    Ext.apply(tplMemberFnsfeatures[i].getFragmentTpl());
                
    Ext.apply(tableTplMemberFnsfeatures[i].getTableFragments());
            }
        }
        
        
    metaRowTpl = new Ext.XTemplate(metaRowTpl.join(''), memberFns);
        
    cfg.row metaRowTpl.applyTemplate(cfg);

        
        
    //metaTableTpl = new Ext.XTemplate(this.metaTableTpl.join(''), tableTplMemberFns);            
        
    metaTableTpl = new Ext.XTemplate(metaTableTpl.join(''), tableTplMemberFns);    // new
        
        
    tpl metaTableTpl.applyTemplate(cfg);
        
        
    // TODO: Investigate eliminating.
        
    if (!textOnly) {
            
    tpl = new Ext.XTemplate(tpltplMemberFns);
        }
        return 
    tpl;
        


    Ext.grid.feature.Feature
    PHP Code:
    mutateMetaTableTpl: function(metaTableTplArray) {

    DELACAP | Github
    "don't code today what you can't debug tomorrow"

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    We can take a look at it.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Premium Member harrydeluxe's Avatar
    Join Date
    Jul 2007
    Location
    Nürnberg, Germany
    Posts
    80

    Default

    bump
    DELACAP | Github
    "don't code today what you can't debug tomorrow"

  4. #4
    Sencha Premium Member
    Join Date
    Nov 2010
    Posts
    4

    Default

    To be able to extend the TableChunker without completly copying and slightly modifying the code (because Singletons cannot be extended), it would be a good idea to create an own class for the behaviour of the TableChunker and to put any template data in the Ext.view.TableChunker singleton.

    Quick example:
    PHP Code:
    Ext.define('Ext.view.AbstractTableChunker', {
        
    requires: ['Ext.XTemplate'],
        
    // .. more code
        
    getTableTpl: function(cfgtextOnly) {
            
    // .. more code
        
    }
        
    // .. more code
    }

    // either an instance of AbstractTableChunker or use given Ext.define with extend and singleton.
    Ext.view.TableChunker Ext.create('Ext.view.AbstractTableChunker', {
        
    metaTableTpl: [
            
    '{[this.openTableWrap()]}',
            
    // more tpl
        
    ]
    }); 

  5. #5
    Sencha Premium Member sonata82's Avatar
    Join Date
    Aug 2011
    Posts
    20

    Default

    Any progress here?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •