Results 1 to 10 of 10

Thread: remoteRoot in summary feature

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9546 in 5.0.2.
  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    8
    Vote Rating
    0
      0  

    Default 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
    6,154
    Vote Rating
    249
      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
      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
      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
    6,154
    Vote Rating
    249
      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
    1,017
    Vote Rating
    125
      3  

    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;
        }
    });
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  7. #7
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Vote Rating
    249
      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 human resources manager: fabienne.bell@sencha.com

  8. #8
    Ext JS Premium Member mcouillard's Avatar
    Join Date
    Jun 2008
    Location
    Bucks County, PA
    Posts
    110
    Vote Rating
    12
      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
    45
    Vote Rating
    3
      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
    9,792
    Vote Rating
    260
      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.


    Join me at SenchaCon 2016!

Posting Permissions

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