Results 1 to 4 of 4

Thread: ColumnFooter using Model for Aggregation

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
      0  

    Default ColumnFooter using Model for Aggregation

    GXT version: 2.0.1

    Detailed description of the problem
    :
    In the ColumnFooter.refresh method, the code for models must have never been used. The line 210 looks on the ColumnModel using the variable "i" which is the row variable, not the column variable. This code needs to be changed to "j"

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    Please read the bugforum guidelines. Moving this to the helpforum for now.

    I think that you are reporting an issue that is already fixed in SVN, but of this description it is hard to guess.

  3. #3
    Sencha User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
      0  

    Default

    The problem is when the method trys to grab values from the aggregate model to build the aggregate row display of the grid, it always pulls the name of the model variable from the ColumnModel using the "i" index in the loop. Well, the "i" loop is for the rows, not the columns, which is an inner for loop with index "j". This causes the aggregate row's value loading from models to completely not work.

    The code fix is covered in my original post. If line 210 in ColumnFooter which reads:

    Code:
     Object obj = config.getModel().get(cm.getDataIndex(i));
    The beginning of this method is correct:

    Code:
        for (int i = 0; i < rowcount; i++) {
          AggregationRowConfig<?> config = cm.getAggregationRow(i);
          FooterRow footer = rows.get(i);
    
          for (int j = 0; j < cols; j++) {
            String name = cm.getDataIndex(j);
    So the code at ColumnFooter:210 needs to read:

    Code:
     Object obj = config.getModel().get(cm.getDataIndex(j));
    Or even better:

    Needs to read:

    Code:
     Object obj = config.getModel().get(name);
    Please let me know what more information you can need here.

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    This is already fixed in SVN

Posting Permissions

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