You found a bug! We've classified it as EXTJS-9546 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    8
    Vote Rating
    0
    mario.casola is on a distinguished road

      0  

    Default remoteRoot in summary feature

    remoteRoot in summary feature


    Hi,


    I'm working with version 4.2 and I have noticed that remoteRoot config is ignored. This is not the case with the grouping summary feature that works fine.


    Best regards
    Mario Casola

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,115
    Vote Rating
    186
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    In the generateSummaryData method source I'm seeing:

    Code:
    ...
    if (me.remoteRoot && reader.rawData) {
                hasRemote = true;
                remoteData = {};
                // reset reader root and rebuild extractors to extract summaries data
                root = reader.root;
                reader.root = me.remoteRoot;
    ...
    Looks like it's being evaluated. Can you elaborate on the issue you're seeing?

  3. #3
    Sencha User
    Join Date
    May 2010
    Posts
    8
    Vote Rating
    0
    mario.casola is on a distinguished road

      0  

    Default


    I've done two test, one with grouping summary feature and one with summary feature. I've used the developer tool of Google Chrome and I've added a breakpoint on the line to which you are referring. With the first feature the line is evaluated and not with the second.
    The generateSummaryData method is only called from Ext.grid.feature.Grouping class.

  4. #4
    Sencha User
    Join Date
    May 2010
    Posts
    8
    Vote Rating
    0
    mario.casola is on a distinguished road

      0  

    Default


    Hi,

    have you got to check the issue?

    thanks
    Mario

  5. #5
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,115
    Vote Rating
    186
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  6. #6
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    974
    Vote Rating
    110
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      2  

    Default


    We are also interested in fixing this.

    Just a note. There is the following phrase
    Code:
    Used by the Grouping Feature when {@link #showSummaryRow} is `true`.
    in the doc comments for the generateSummaryData method. So, it is supposed to be used only with a GroupingSummary feature.

    Currently, we are using the following override as a workaround.
    Code:
    Ext.grid.feature.Summary.override({
        createSummaryRecord: function(view) {
            var columns = view.headerCt.getVisibleGridColumns(),
                info = {
                    records: view.store.getRange()
                },
                colCount = columns.length, i, column,
                summaryRecord = this.summaryRecord || (this.summaryRecord = new view.store.model(null, view.id + '-summary-record'));
    
            // Set the summary field values
            summaryRecord.beginEdit();
    
            if (this.remoteRoot) {
                if (view.store.proxy.reader.rawData) {
                    summaryRecord.set(view.store.proxy.reader.rawData.summaryData); // hardcoded "summaryData"
                }
            } else {
                for (i = 0; i < colCount; i++) {
                    column = columns[i];
    
                    // In summary records, if there's no dataIndex, then the value in regular rows must come from a renderer.
                    // We set the data value in using the column ID.
                    if (!column.dataIndex) {
                        column.dataIndex = column.id;
                    }
    
                    summaryRecord.set(column.dataIndex, this.getSummary(view.store, column.summaryType, column.dataIndex, info));
                } 
            }
    
            summaryRecord.endEdit(true);
            // It's not dirty
            summaryRecord.commit(true);
            summaryRecord.isSummary = true;
    
            return summaryRecord;
        }
    });
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  7. #7
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,115
    Vote Rating
    186
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Thanks, @Daniil.
    I added your notes to the ticket.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

  8. #8
    Ext JS Premium Member mcouillard's Avatar
    Join Date
    Jun 2008
    Location
    Bucks County, PA
    Posts
    103
    Vote Rating
    8
    mcouillard will become famous soon enough

      0  

    Thumbs up


    We're also using that remoteRoot override to support a remote data summary. Thanks!

  9. #9
    Sencha User
    Join Date
    Oct 2010
    Posts
    28
    Vote Rating
    0
    undeclared is an unknown quantity at this point

      0  

    Default


    Has this been fixed in Ext JS 5 or Ext JS 4.2.2?

  10. #10
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,681
    Vote Rating
    70
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    Looks like we haven't had a chance to get to this one yet. I've noted your interest on the ticket to add visibility.
    Get on the Fast Track with Sencha Training http://sencha.com/training

    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com