Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    potential error with ListGridField.getSortDirection()?

    SmartClient Version: SNAPSHOT_v9.1d_2013-12-17/PowerEdition Deployment (built 2013-12-17)
    GWT 2.5.1
    IE-8

    I seem to be getting this error on the following:
    Code:
    if(sortListGridField.getSortDirection() == SortDirection.ASCENDING) {
    Code:
    ERROR: Uncaught exception escaped
    com.google.gwt.event.shared.UmbrellaException: Exception caught: Something other than a boolean was returned from JSNI method '@com.smartgwt.client.util.JSOHelper::getAttributeAsBoolean(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/String;)': JS value of type string, expected boolean
    	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    	at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:487)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	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:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    	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:242)
    	at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	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:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    	at java.lang.Thread.run(Thread.java:744)
    Caused by: com.google.gwt.dev.shell.HostedModeException: Something other than a boolean was returned from JSNI method '@com.smartgwt.client.util.JSOHelper::getAttributeAsBoolean(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/String;)': JS value of type string, expected boolean
    	at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:100)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:196)
    	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35)
    	at com.smartgwt.client.util.JSOHelper.getAttributeAsBoolean(JSOHelper.java)
    	at com.smartgwt.client.core.DataClass.getAttributeAsBoolean(DataClass.java:124)
    	at com.smartgwt.client.widgets.grid.ListGridField.getSortDirection(ListGridField.java:4154)
    	at com.anstca.tz.client.floater.pivottable.view.PivotTableGrid.updateViewMeasureSortState(PivotTableGrid.java:238)
    	at com.anstca.tz.client.floater.pivottable.view.ViewMediator.saveView(ViewMediator.java:80)
    	at com.anstca.tz.client.floater.pivottable.presentation.PivotTableWindow$4.onClick(PivotTableWindow.java:314)
    	at com.smartgwt.client.widgets.menu.events.MenuItemClickEvent.dispatch(MenuItemClickEvent.java:107)
    	at com.smartgwt.client.widgets.menu.events.MenuItemClickEvent.dispatch(MenuItemClickEvent.java:1)
    	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    	at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:487)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	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:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    	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:242)
    	at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	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:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    	at java.lang.Thread.run(Thread.java:744)
    Has anyone else seen this with ListGridField.getSortDirection()?

    #2
    Tested with the following code and could not reproduce. Please provide a more complete test case that reproduces the problem.

    Code:
                    final ListGridField field= new ListGridField();
    //		field.setSortDirection(SortDirection.ASCENDING);
    		
    		Button button = new Button();
    		button.addClickHandler(new ClickHandler() {
    			@Override
    			public void onClick(ClickEvent event) {
    				SC.say("Compare " + (field.getSortDirection()==SortDirection.ASCENDING));
    
    			}
    		});
    		button.draw();

    Comment


      #3
      Give this a try:

      Code:
      final ListGridField field= new ListGridField();
      		field.setSortDirection(SortDirection.ASCENDING);
      
              TreeGrid treeGrid = new TreeGrid();
              treeGrid.setFields(field);
              final ListGridField testField = treeGrid.getField(treeGrid.getSortField());
      
              Button button = new Button();
              button.addClickHandler(new ClickHandler() {
                  @Override
                  public void onClick(ClickEvent event) {
                      SC.say("Compare " + (testField.getSortDirection() == SortDirection.ASCENDING));
      
                  }
              });

      Comment


        #4
        I wasn't able to run your code as you have it. I modified it so it would run and not throw NPE's on execution, but still cannot reproduce the issue.

        Code:
        		final ListGridField field= new ListGridField();
        		field.setSortDirection(SortDirection.ASCENDING);
        
                final TreeGrid treeGrid = new TreeGrid();
                treeGrid.setFields(field);
                treeGrid.setTop(30);
                treeGrid.draw();
                
                Button button = new Button();
                button.addClickHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
        //                final ListGridField testField = treeGrid.getField(treeGrid.getSortField());
                        SC.say("Compare " + (field.getSortDirection() == SortDirection.ASCENDING) );
        
                    }
                });
                button.draw();

        Comment


          #5
          can you try this test case:
          Code:
          private void testcase2() {
                  Window win = new Window();
                  final ListGridField field= new ListGridField("name1", "Name 1");
                  field.setSortDirection(SortDirection.ASCENDING);
          
                  final TreeGrid treeGrid = new TreeGrid();
                  treeGrid.setFields(field);
                  treeGrid.setTop(30);
                  win.addMember(treeGrid);
                  treeGrid.draw();
          
                  Button button = new Button();
                  button.addClickHandler(new ClickHandler() {
                      @Override
                      public void onClick(ClickEvent event) {
                          final String sortField = treeGrid.getSortField();
                          GWT.log("sortField:" + sortField);
                          final ListGridField testField = treeGrid.getField(sortField);
                          SC.say("Compare " + (testField.getSortDirection() == SortDirection.ASCENDING) );
          
                      }
                  });
                  win.addMember(button);
                  button.draw();
                  win.show();
          
              }
          which produces this error:
          Code:
          INFO: sortField:null
          ERROR: Uncaught exception escaped
          com.google.gwt.event.shared.UmbrellaException: Exception caught: null
          	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
          	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
          	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	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:172)
          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
          	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
          	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
          	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
          	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
          	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:242)
          	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	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:172)
          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
          	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
          	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
          	at java.lang.Thread.run(Thread.java:744)
          Caused by: java.lang.NullPointerException: null
          	at com.anstca.tz.client.floater.pivottable.presentation.PivotTableWindow$3.onClick(PivotTableWindow.java:253)
          	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:108)
          	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
          	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
          	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
          	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
          	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
          	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
          	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
          	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	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:172)
          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
          	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
          	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
          	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
          	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
          	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:242)
          	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	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:172)
          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
          	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
          	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
          	at java.lang.Thread.run(Thread.java:744)
          I think the problem may be in ListGrid.getSortField()?

          Comment


            #6
            We were able to reproduce the issue with your last example. Once we have a fix for the problem we will let you know.

            Isomorphic

            Comment


              #7
              A fix has been found for this, you should see it in tonights nightly build of 4.1.

              Comment


                #8
                SmartClient Version: v9.1d_2014-02-26/PowerEdition Deployment (built 2014-02-26)
                GWT 2.5.1
                IE-11

                I was unable to verify the nightly build from 2-26 with this issue. The following test case produces this stack trace now from the client side. Please see below:

                Code:
                    private void testcase2() {
                        Window win = new Window();
                        final ListGridField field= new ListGridField("name1", "Name 1");
                        field.setSortDirection(SortDirection.ASCENDING);
                
                        final TreeGrid treeGrid = new TreeGrid();
                        treeGrid.setFields(field);
                        treeGrid.setTop(30);
                        win.addMember(treeGrid);
                        treeGrid.draw();
                
                        Button button = new Button();
                        button.addClickHandler(new ClickHandler() {
                            @Override
                            public void onClick(ClickEvent event) {
                                final String sortField = treeGrid.getSortField();
                                GWT.log("sortField:" + sortField);
                                final ListGridField testField = treeGrid.getField(sortField);
                                SC.say("Compare " + (testField.getSortDirection() == SortDirection.ASCENDING) );
                
                            }
                        });
                        win.addMember(button);
                        button.draw();
                        win.show();
                
                    }
                Code:
                INFO: sortField:null
                ERROR: Uncaught exception escaped
                com.google.gwt.event.shared.UmbrellaException: Exception caught: null
                	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
                	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                	at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
                	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                	at java.lang.reflect.Method.invoke(Method.java:606)
                	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:172)
                	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                	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:242)
                	at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
                	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                	at java.lang.reflect.Method.invoke(Method.java:606)
                	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:172)
                	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                	at java.lang.Thread.run(Thread.java:744)
                Caused by: java.lang.NullPointerException: null
                	at com.anstca.tz.client.floater.pivottable.presentation.PivotTableWindow$3.onClick(PivotTableWindow.java:285)
                	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:111)
                	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
                	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
                	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
                	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
                	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
                	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
                	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                	at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
                	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                	at java.lang.reflect.Method.invoke(Method.java:606)
                	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:172)
                	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                	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:242)
                	at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
                	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                	at java.lang.reflect.Method.invoke(Method.java:606)
                	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:172)
                	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                	at java.lang.Thread.run(Thread.java:744)
                ERROR: Uncaught exception escaped
                com.google.gwt.core.client.JavaScriptException: (ReferenceError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(16486), JavaScript object(16487), JavaScript object(16488)]): 'resultsForm' is undefined
                	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
                	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                	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:242)
                	at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
                	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                	at java.lang.reflect.Method.invoke(Method.java:606)
                	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:172)
                	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                	at java.lang.Thread.run(Thread.java:744)
                Last edited by JLivermore; 28 Feb 2014, 09:42.

                Comment


                  #9
                  ListGrid.getSortField() appears to still be giving me a NULL in this test case. Can you confirm this on your end?

                  Comment


                    #10
                    SmartClient Version: v9.1d_2014-02-26/PowerEdition Deployment (built 2014-02-26)
                    GWT 2.5.1
                    IE-11

                    Here is a variation on the same theme with different results:

                    ListGrid.getSortField() does not return NULL, however, in the Button.onClick the very last line when we call

                    SC.say("testfield.getSortDirection : " + testField.getSortDirection());

                    a new exception listed below is thrown.

                    Code:
                    private void testcase3() {
                            Window win = new Window();
                            final ListGridField field= new ListGridField("name1", "Name 1");
                    
                            final TreeGrid treeGrid = new TreeGrid();
                            treeGrid.setFields(field);
                            treeGrid.setTop(30);
                    
                            SortSpecifier[] sort = {new SortSpecifier("name1", SortDirection.ASCENDING)};
                            treeGrid.setSort(sort);
                    
                            win.addMember(treeGrid);
                            treeGrid.draw();
                    
                            Button button = new Button();
                            button.addClickHandler(new ClickHandler() {
                                @Override
                                public void onClick(ClickEvent event) {
                                    final String sortField = treeGrid.getSortField();
                                    GWT.log("sortField:" + sortField);
                                    final ListGridField testField = treeGrid.getField(sortField);
                                    SC.say("testfield.getSortDirection :  " + testField.getSortDirection());
                    
                    
                                }
                            });
                            win.addMember(button);
                            button.draw();
                            win.show();
                    
                        }
                    Code:
                    INFO: sortField:name1
                    ERROR: Uncaught exception escaped
                    com.google.gwt.event.shared.UmbrellaException: Exception caught: Something other than a boolean was returned from JSNI method '@com.smartgwt.client.util.JSOHelper::getAttributeAsBoolean(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/String;)': JS value of type string, expected boolean
                    	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
                    	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                    	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    	at java.lang.reflect.Method.invoke(Method.java:606)
                    	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:172)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                    	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:242)
                    	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    	at java.lang.reflect.Method.invoke(Method.java:606)
                    	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:172)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                    	at java.lang.Thread.run(Thread.java:744)
                    Caused by: com.google.gwt.dev.shell.HostedModeException: Something other than a boolean was returned from JSNI method '@com.smartgwt.client.util.JSOHelper::getAttributeAsBoolean(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/String;)': JS value of type string, expected boolean
                    	at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:100)
                    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:196)
                    	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35)
                    	at com.smartgwt.client.util.JSOHelper.getAttributeAsBoolean(JSOHelper.java)
                    	at com.smartgwt.client.core.DataClass.getAttributeAsBoolean(DataClass.java:124)
                    	at com.smartgwt.client.widgets.grid.ListGridField.getSortDirection(ListGridField.java:4227)
                    	at com.anstca.tz.client.floater.pivottable.presentation.PivotTableWindow$3.onClick(PivotTableWindow.java:290)
                    	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:111)
                    	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
                    	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
                    	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
                    	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
                    	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
                    	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
                    	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                    	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    	at java.lang.reflect.Method.invoke(Method.java:606)
                    	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:172)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                    	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:242)
                    	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
                    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    	at java.lang.reflect.Method.invoke(Method.java:606)
                    	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:172)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                    	at java.lang.Thread.run(Thread.java:744)

                    Comment


                      #11
                      Retested with build: SmartClient Version: v9.1p_2014-03-03/PowerEdition Deployment (built 2014-03-03)

                      and testcase2 and testcase3 still are throwing errors:

                      testcase2
                      Code:
                      INFO: sortField:null
                      ERROR: Uncaught exception escaped
                      com.google.gwt.event.shared.UmbrellaException: Exception caught: null
                      	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
                      	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                      	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                      	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                      	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:242)
                      	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                      	at java.lang.Thread.run(Thread.java:744)
                      Caused by: java.lang.NullPointerException: null
                      	at com.anstca.tz.client.floater.pivottable.presentation.PivotTableWindow$4.onClick(PivotTableWindow.java:319)
                      	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:111)
                      	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
                      	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
                      	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
                      	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
                      	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
                      	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
                      	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                      	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                      	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                      	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:242)
                      	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                      	at java.lang.Thread.run(Thread.java:744)
                      testcase3
                      Code:
                      INFO: sortField:name1
                      ERROR: Uncaught exception escaped
                      com.google.gwt.event.shared.UmbrellaException: Exception caught: Something other than a boolean was returned from JSNI method '@com.smartgwt.client.util.JSOHelper::getAttributeAsBoolean(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/String;)': JS value of type string, expected boolean
                      	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
                      	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                      	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                      	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                      	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:242)
                      	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                      	at java.lang.Thread.run(Thread.java:744)
                      Caused by: com.google.gwt.dev.shell.HostedModeException: Something other than a boolean was returned from JSNI method '@com.smartgwt.client.util.JSOHelper::getAttributeAsBoolean(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/String;)': JS value of type string, expected boolean
                      	at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:100)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:196)
                      	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35)
                      	at com.smartgwt.client.util.JSOHelper.getAttributeAsBoolean(JSOHelper.java)
                      	at com.smartgwt.client.core.DataClass.getAttributeAsBoolean(DataClass.java:124)
                      	at com.smartgwt.client.widgets.grid.ListGridField.getSortDirection(ListGridField.java:4227)
                      	at com.anstca.tz.client.floater.pivottable.presentation.PivotTableWindow$3.onClick(PivotTableWindow.java:290)
                      	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:111)
                      	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
                      	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
                      	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
                      	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
                      	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
                      	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
                      	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                      	at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                      	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                      	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:242)
                      	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                      	at java.lang.reflect.Method.invoke(Method.java:606)
                      	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:172)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                      	at java.lang.Thread.run(Thread.java:744)

                      Comment


                        #12
                        Try again after tonight's nightly build.

                        Isomorphic

                        Comment


                          #13
                          SmartClient Version: v9.1p_2014-03-05/PowerEdition Deployment (built 2014-03-05)
                          GWT 2.5.1
                          IE-11

                          testcase3 (posted earlier) has been fixed.

                          testcase2 is still not working.
                          Code:
                          private void testcase2() {
                                  Window win = new Window();
                                  final ListGridField field= new ListGridField("name1", "Name 1");
                                  field.setSortDirection(SortDirection.ASCENDING);
                          
                                  final TreeGrid treeGrid = new TreeGrid();
                                  treeGrid.setFields(field);
                                  treeGrid.setTop(30);
                                  win.addMember(treeGrid);
                                  treeGrid.draw();
                          
                                  Button button = new Button();
                                  button.addClickHandler(new ClickHandler() {
                                      @Override
                                      public void onClick(ClickEvent event) {
                                          final String sortField = treeGrid.getSortField();
                                          GWT.log("sortField:" + sortField);
                                          final ListGridField testField = treeGrid.getField(sortField);
                                          SC.say("Compare " + (testField.getSortDirection() == SortDirection.ASCENDING) );
                          
                                      }
                                  });
                                  win.addMember(button);
                                  button.draw();
                                  win.show();
                          
                              }
                          here is the stack trace from the log:
                          Code:
                          INFO: sortField:null
                          ERROR: Uncaught exception escaped
                          com.google.gwt.event.shared.UmbrellaException: Exception caught: null
                          	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
                          	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                          	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
                          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                          	at java.lang.reflect.Method.invoke(Method.java:606)
                          	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:172)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                          	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                          	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                          	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                          	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:242)
                          	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
                          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                          	at java.lang.reflect.Method.invoke(Method.java:606)
                          	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:172)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                          	at java.lang.Thread.run(Thread.java:744)
                          Caused by: java.lang.NullPointerException: null
                          	at com.anstca.tz.client.floater.pivottable.presentation.PivotTableWindow$4.onClick(PivotTableWindow.java:299)
                          	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:111)
                          	at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
                          	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
                          	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
                          	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
                          	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
                          	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
                          	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
                          	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
                          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                          	at java.lang.reflect.Method.invoke(Method.java:606)
                          	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:172)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
                          	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
                          	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
                          	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
                          	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:242)
                          	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
                          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                          	at java.lang.reflect.Method.invoke(Method.java:606)
                          	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:172)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                          	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                          	at java.lang.Thread.run(Thread.java:744)

                          Comment


                            #14
                            Hi checking in to see if there is any update to this issue?

                            Comment


                              #15
                              After re-analyzing testcase 2, it seems like the crash you're seeing would be expected. You configured a default sorting direction for the sole field of the TreeGrid, but you have not actually told the TreeGrid to sort.

                              Therefore sortField = treeGrid.getSortField() is null, and testField = treeGrid.getField(sortField) is also null and you are trying to call ListGridField.getSortDirection() on null.

                              Comment

                              Working...
                              X