Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    13
    Vote Rating
    0
    fullinet is on a distinguished road

      0  

    Exclamation [FNR] [Removing an Item of a Grouping Grid grouped by a nested property

    [FNR] [Removing an Item of a Grouping Grid grouped by a nested property


    • Detailed description of the problem
      I have a grid grouped by for example store.groupBy("industry.name") where industry is a custom type (extending BaseModel or implementing BeanModelTag) and has a string property called name.
      If I remove an item from the store I get a JavaScriptException.

      Below is the stacktrace showed on the GWT Develoment Mode Console and a slightly modified version of the grouping grid example to support a graph of custom type objects.

      PHP Code:
      com.google.gwt.core.client.JavaScriptException: (TypeError): 'null' is null or not an object  
       number
      : -2146823281
       description
      'null' is null or not an object 
          at com
      .google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
          
      at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
          
      at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)     
          
      at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
          
      at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
          
      at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
          
      at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
          
      at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
          
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          
      at java.lang.reflect.Method.invoke(Method.java:597)
          
      at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
          
      at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
          
      at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
          
      at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
          
      at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
          
      at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
          
      at java.lang.Thread.run(Thread.java:619
    • GXT version
      2.1.1

    • Host mode / web mode / both
      Both

    • Browser and version
      I tested it on IE8, FF3.6, Chrome 6 Dev

    • Operating System
      Windows XP SP3

    • Sample code
      PHP Code:
      public class Test implements EntryPoint {

          @
      Override
          
      public void onModuleLoad() {
              
      Viewport viewport = new Viewport();
              
      viewport.add(new GroupingGridExample());
              
      RootPanel.get().add(viewport);
          }

          public class 
      GroupingGridExample extends LayoutContainer {
              @
      Override
              
      protected void onRender(Element parentint index) {
                  
      super.onRender(parentindex);

                  
      setLayout(new FlowLayout(10));

                  
      GroupingStore<Stockstore = new GroupingStore<Stock>();
                  
      store.add(TestData.getCompanies());
                  
      store.groupBy("industry.name");

                  
      ColumnConfig company = new ColumnConfig("name""Company"60);
                  
      ColumnConfig industry = new ColumnConfig("industry.name""Industry"20);

                  List<
      ColumnConfigconfig = new ArrayList<ColumnConfig>();
                  
      config.add(company);
                  
      config.add(industry);

                  final 
      ColumnModel cm = new ColumnModel(config);

                  
      GroupingView view = new GroupingView();
                  
      view.setShowGroupedColumn(false);
                  
      view.setForceFit(true);
                  
      view.setGroupRenderer(new GridGroupRenderer() {
                      public 
      String render(GroupColumnData data) {
                          
      String f cm.getColumnById(data.field).getHeader();
                          
      String l data.models.size() == "Item" "Items";
                          return 
      ": " data.group " (" data.models.size() + " " ")";
                      }
                  });

                  
      Grid<Stockgrid = new Grid<Stock>(storecm);
                  
      grid.setView(view);
                  
      grid.setBorders(true);

                  
      ContentPanel panel = new ContentPanel();
                  
      panel.setHeading("Grouping Example");
                  
      panel.setCollapsible(true);
                  
      panel.setFrame(true);
                  
      panel.setSize(700450);
                  
      panel.setLayout(new FitLayout());
                  
      panel.setTopComponent(getToolBar(grid));
                  
      panel.add(grid);

                  
      add(panel);
              }

              private 
      ToolBar getToolBar(final Grid<Stockgrid) {
                  
      ToolBar toolbar = new ToolBar();
                  
      toolbar.add(new Button("Remove Item",
                          new 
      SelectionListener<ButtonEvent>() {
                              @
      Override
                              
      public void componentSelected(ButtonEvent ce) {
                                  
      Stock itemToRemove grid.getStore().getAt(0);
                                  
      grid.getStore().remove(itemToRemove);
                              }
                          }));
                  return 
      toolbar;
              }
          }

      PHP Code:
      public class Stock extends BaseModel {

          public 
      Stock() {
          }

          public 
      Stock(String nameIndustry industry) {
              
      set("name"name);
              
      set("industry"industry);
          }

          public 
      Industry getIndustry() {
              return 
      get("industry");
          }

          public 
      String getName() {
              return (String) 
      get("name");
          }


      PHP Code:
      public class Industry extends BaseModel {

          public 
      Industry() {
          }

          public 
      Industry(String name) {
              
      set("name"name);
          }

          public 
      String getName() {
              return (String) 
      get("name");
          }


      PHP Code:
      public class TestData {

          public static List<
      StockgetCompanies() {
              
      Industry manufacturing = new Industry("Manufacturing");
              
      Industry computer = new Industry("Computer");

              List<
      Stockstocks = new ArrayList<Stock>();

              
      stocks.add(new Stock("3m Co"manufacturing));
              
      stocks.add(new Stock("Alcoa Inc"manufacturing));
              
      stocks.add(new Stock("Intel Corporation"computer));
              
      stocks.add(new Stock("International Business Machines"computer));

              return 
      stocks;
          }



  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    THis is already fixed in SVN

  3. #3

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    13
    Vote Rating
    0
    fullinet is on a distinguished road

      0  

    Default


    I searched but I don't see that similar post, sorry...

    There is any estimated time for the release 2.2? (The roadmap http://www.sencha.com/products/gwt/roadmap.php is not updated).

    Thanks

Similar Threads

  1. [FNR] GridView refreshRow javascript exception w/ grouping grid
    By jonjanisch in forum Ext GWT: Bugs (2.x)
    Replies: 3
    Last Post: 2 Feb 2011, 10:53 AM
  2. Replies: 1
    Last Post: 15 Mar 2010, 7:09 AM
  3. Grouping Grid not grouped
    By sanjshah in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Oct 2009, 3:02 AM
  4. Multiple levels of grouping in grouped grid?
    By jfizer in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 28 Jul 2008, 1:37 AM

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi