1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    3
    Vote Rating
    0
    ixvivxi is on a distinguished road

      0  

    Default MultiGroupingPanel on Ext 3.3 beta

    MultiGroupingPanel on Ext 3.3 beta


    I recently tested venky0589's MultiGroupingPanel control on Ext 3.3 beta 2 and found that despite being coded for Ext 2, the control successfully performed multiple grouping on Ext 3.3 beta 2. Thing is, the grouped elements did not expand or contract; when the user attempted to operate them, an error was generated in in file ext-all-debug.js, line 5129: "s.replace is not a function". I believe that some of the standard GridView event handlers were called despite a MultiGroupingView configuration; this error can be reproduced quite easily with Ext 3.3 beta 2, a modestly-configured Apache web server, and the code from venky0589's thread on his seminal grid control. Has anyone managed to get the MultiGroupingPanel control working with Ext 3.3 beta 2?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    12
    Vote Rating
    0
    karimchebani is on a distinguished road

      0  

    Default


    I got the same issue, if I found something, I will post here. (If you found a fix, please post it ^^)

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    12
    Vote Rating
    0
    karimchebani is on a distinguished road

      0  

    Default


    I found where the problem is :

    Ext-all-debug.js in GroupView definition line 50816 :

    Code:
    processEvent: function(name, e){
            Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
            var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
            if(hd){
                
                var field = this.getGroupField(),
                    prefix = this.getPrefix(field),
                    groupValue = hd.id.substring(prefix.length),
                    emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd'); // <--- HERE IS THE PROBLEM
    
                
                groupValue = groupValue.substr(0, groupValue.length - 3);
                
                
                if(groupValue || emptyRe.test(hd.id)){
                    this.grid.fireEvent('group' + name, this.grid, field, groupValue, e);
                }
                if(name == 'mousedown' && e.button == 0){
                    this.toggleGroup(hd.parentNode);
                }
            }
    
        }

  4. #4
    Sencha User
    Join Date
    Jan 2010
    Posts
    37
    Vote Rating
    0
    DerSalz is on a distinguished road

      0  

    Default


    I wonder if it's planed to support multiple grouping in the future of ExtJS. I would really appreciate such a feature! Does anybody know if this is planed for ExtJS?

  5. #5
    Sencha User
    Join Date
    May 2010
    Posts
    9
    Vote Rating
    0
    cristinadelosa is on a distinguished road

      0  

    Default


    karimchebani, how it solves the problem?

  6. #6
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196
    Vote Rating
    6
    yyogev is on a distinguished road

      0  

    Default


    I ran into this problem too.
    The problem is that variable "field" is expected to be a string, while in multi-grouping view it is an array.
    Yaron Yogev

    IT Software Developer

  7. #7
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196
    Vote Rating
    6
    yyogev is on a distinguished road

      1  

    Thumbs up Solved!

    Solved!


    The problem in ExtJS 3.3 happens in the processEvent function of groupingView, which expects getGroupField to return a string with the name of the field. In the Multi-Grouping view the returned value is an array of field names.

    I fixed this by copying the processEvent code from GroupingView.js to MultiGroupingView:
    Code:
        processEvent: function(name, e)
        {
            Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
            var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
            if (hd)
            {
                // group value is at the end of the string
                var field = this.getGroupField();
                // in MultiGroupingView field is an array of field names,
                // so take just the last field name
                if (typeof field == "object" && field.length)
                    field = field[field.length-1];
                var prefix = this.getPrefix(field);
                var groupValue = hd.id.substring(prefix.length);
                var emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd');
                // remove trailing '-hd'
                groupValue = groupValue.substr(0, groupValue.length - 3);
    
                // also need to check for empty groups
                if(groupValue || emptyRe.test(hd.id)){
                    this.grid.fireEvent('group' + name, this.grid, field, groupValue, e);
                }
                if(name == 'mousedown' && e.button == 0){
                    this.toggleGroup(hd.parentNode);
                }
            }
        }
    Yaron Yogev

    IT Software Developer

  8. #8
    Ext User
    Join Date
    Dec 2007
    Posts
    214
    Vote Rating
    0
    Radziu is an unknown quantity at this point

      0  

    Default


    What version multi grouping did you use?

  9. #9
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196
    Vote Rating
    6
    yyogev is on a distinguished road

      0  

    Default I used a modified version based on the version from galdaka

    I used a modified version based on the version from galdaka


    Quote Originally Posted by Radziu View Post
    What version multi grouping did you use?
    I used a modified version of the multi-grouping grid based on the version from galdaka.

    The one I use has some modifications to make it work with summary and editor grid.

    I attach it here so you can use. It includes the latest fix for 3.3.0.
    multi_grouping_with_edit_and_summary.zip
    Yaron Yogev

    IT Software Developer

  10. #10
    Ext User
    Join Date
    Dec 2007
    Posts
    214
    Vote Rating
    0
    Radziu is an unknown quantity at this point

      0  

    Default


    some nodes don't collapse. Have you got any example grid?

Similar Threads

  1. How to set start/end TIME for Ext.calendar.CalendarPanel (Ext 3.3. beta)
    By omermx in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 8 Dec 2010, 12:21 PM
  2. How can we make groupField to be Selectable in Ext.ux.MultiGroupingPanel
    By ramana_l_v in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 31 Dec 2009, 4:47 PM
  3. Ext.nd Beta 1
    By RWaters in forum Ext.nd for Notes/Domino
    Replies: 12
    Last Post: 14 Feb 2008, 12:53 PM
  4. Ext 2.0 Beta 1 Now Available
    By ReyBango in forum Community Discussion
    Replies: 4
    Last Post: 12 Oct 2007, 6:04 AM
  5. [beta] Ext.ux.ItemSelector (part of Ext.ux.Multiselect v1.2)
    By tjstuart in forum Ext 1.x: User Extensions and Plugins
    Replies: 36
    Last Post: 20 Sep 2007, 3:42 PM

Thread Participants: 19