Announcement

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

    ListGrid.getSortDirection () throws IllegalArgumentException

    1. the *complete* SmartGWT or SmartClient version from the lower left-hand corner of the Developer Console (see FAQ for how to open Developer Console), for example, \"v8.2p_2012-04-18/PowerEdition Deployment\"
    SmartClient Version: v10.0p_2015-07-06/LGPL Development Only (built 2015-07-06)
    GWT 2.5.0

    2. browser(s) and version(s) involved
    FF 19

    3. for a server-side problem, the *complete* logs generated during processing of the failing request (do *not* trim to just the error message)

    4. for any problem processing a server response, the actual response as shown in the RPC tab in the Developer Console

    5. if there is a JavaScript error, the stack trace logged in the Developer Console (see FAQ)
    Code:
    00:00:55.592 [ERROR] Something other than a Java object was returned from JSNI method '@com.smartgwt.client.widgets.BaseWidget::getAttributeAsJavaScriptObject(Ljava/lang/String;)': JS value of type boolean, expected java.lang.Objectjava.lang.IllegalArgumentException: Something other than a Java object was returned from JSNI method '@com.smartgwt.client.widgets.BaseWidget::getAttributeAsJavaScriptObject(Ljava/lang/String;)': JS value of type boolean, expected java.lang.Object
     at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178)
     at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:281)
     at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
     at com.smartgwt.client.widgets.BaseWidget.getAttributeAsJavaScriptObject(BaseWidget.java)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     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.smartgwt.client.widgets.grid.ListGrid.getSortDirection(ListGrid.java)
     at org.shortpasta.smartgwttest.portal.client.layout.ListGridSortDirectionLayout$1.onClick(ListGridSortDirectionLayout.java:69)
     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.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     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.GeneratedMethodAccessor33.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     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:745)
    6. sample code if applicable
    Code:
    public class ListGridSortDirectionLayout implements EntryPoint {
    
      /**
       * The EntryPoint interface
       * Upgrading SmartGWT from 4.0-2013-11-30 to 5.0-2015-06-25
       * In dev mode, getSortDirection () throws an IllegalArgumentException
       * In production mode, it does not
       */
      public void onModuleLoad () {
    
        // fields
        final ListGridField nameField = new ListGridField ("name", "Name");
    
        // grid
        final ListGrid listGrid = new ListGrid ();
        listGrid.setFields (nameField);
    
        // test
        final IButton button = new IButton ("Test", new ClickHandler () {
          public void onClick (final ClickEvent event) {
            try {
              final SortDirection sortDirection = listGrid.getSortDirection ();
              GWT.log ("sortDirection: " + sortDirection);
            }
            catch (final Throwable t) {
              GWT.log (t.getMessage (), t);
            }
          }
        });
    
        // layout
        final VLayout layout = new VLayout ();
        layout.addMember (listGrid);
        layout.addMember (button);
        layout.draw ();
      }
    }
    Posts with incomplete information are much more likely to be ignored.

    #2
    We've made a change which should address this for you - please retest with a build dated July 18 or later.

    Comment


      #3
      Confirmed working in:
      SmartClient Version: v10.0p_2015-07-18/LGPL Development Only (built 2015-07-18)

      Thanks!

      Comment


        #4
        I don't know if this is new or not, but if I do this:
        1. Start webapp
        2. Start dev console
        3. Kill the devmode process

        Then I get this on the webapp browser window:
        Code:
        Expected Array as second arg or props.args in MessagingDMIClient.call(), but got:08:24:41.638:TMR2:WARN:Timer:fireCallback() unable to convert callback: [object Object] to a function.  target: [Class EventHandler], argNames: undefined, args: 1437233081637,
        Stack trace:
        
        
            MessagingDMIClient.call(_1=>"addToLog", _2=>08:24:41.638:TMR2:WARN:Timer:fireCallback() unable to convert callback: [object Object] to a function.  target: [Class EventHandler], argNames: undefined, args: 1437233081637,, _3=>undef)
            LogViewer.addToLog(_1=>"08:24:41.638:TMR2:WARN:Timer:fireCallbac..."[174], _2=>undef)
            anonymous(message=>"08:24:41.638:TMR2:WARN:Timer:fireCallbac..."[174])
            thunk(message=>"08:24:41.638:TMR2:WARN:Timer:fireCallbac..."[174])
            addToMasterLogObservation("08:24:41.638:TMR2:WARN:Timer:fireCallbac..."[174])
            [c]Log.addLogMessage(_1=>3, _2=>"fireCallback() unable to convert callbac..."[145], _3=>"Timer", _4=>undef, _5=>undef)
            [c]Log.log(_1=>3, _2=>"fireCallback() unable to convert callbac..."[145], _3=>"Timer", _4=>undef, _5=>[Class Timer], _6=>undef)
            [a]MathFunction.logMessage(_1=>2, _2=>"Expected Array as second arg or props.ar..."[256], _3=>undef, _4=>undef)
            [a]MathFunction.logError(_1=>"Expected Array as second arg or props.ar..."[256], _2=>undef)
            ** recursed on MessagingDMIClient.call
        Then again:
        Code:
        Expected Array as second arg or props.args in MessagingDMIClient.call(), but got:08:26:25.757:TMR4:WARN:Timer:fireCallback() unable to convert callback: [object Object] to a function.  target: [MessagingDMISocket ID:isc_MessagingDMISocket_0], argNames: undefined, args: [object Object],[MessagingDMISocket ID:isc_MessagingDMISocket_2],[object Window],
        Stack trace:
        
        
            MessagingDMIClient.call(_1=>"addToLog", _2=>08:26:25.757:TMR4:WARN:Timer:fireCallback() unable to convert callback: [object Object] to a function.  target: [MessagingDMISocket ID:isc_MessagingDMISocket_0], argNames: undefined, args: [object Object],[MessagingDMISocket ID:isc_MessagingDMISocket_2],[object Window],, _3=>undef)
            LogViewer.addToLog(_1=>"08:26:25.757:TMR4:WARN:Timer:fireCallbac..."[269], _2=>undef)
            anonymous(message=>"08:26:25.757:TMR4:WARN:Timer:fireCallbac..."[269])
            thunk(message=>"08:26:25.757:TMR4:WARN:Timer:fireCallbac..."[269])
            addToMasterLogObservation("08:26:25.757:TMR4:WARN:Timer:fireCallbac..."[269])
            [c]Log.addLogMessage(_1=>3, _2=>"fireCallback() unable to convert callbac..."[240], _3=>"Timer", _4=>undef, _5=>undef)
            [c]Log.log(_1=>3, _2=>"fireCallback() unable to convert callbac..."[240], _3=>"Timer", _4=>undef, _5=>[Class Timer], _6=>undef)
            [a]MathFunction.logMessage(_1=>2, _2=>"Expected Array as second arg or props.ar..."[351], _3=>undef, _4=>undef)
            [a]MathFunction.logError(_1=>"Expected Array as second arg or props.ar..."[351], _2=>undef)
            ** recursed on MessagingDMIClient.call
        Then:
        Code:
        Expected Array as second arg or props.args in MessagingDMIClient.call(), but got:08:27:22.928:MDN4:ERROR:MessagingDMIClient:Expected Array as second arg or props.args in MessagingDMIClient.call(), but got:lastMouseDown,
        Stack trace:
        
        
            MessagingDMIClient.call(_1=>"staticForm.setValue", _2=>lastMouseDown,, _3=>undef)
            DebugTarget.displayMouseDownTarget()
            anonymous(_1=>[object MouseEvent], _2=>undef)
            thunk(_1=>[object MouseEvent], _2=>undef)
            doHandleMouseDownObservation([object MouseEvent], undef)
            [c]EventHandler.handleMouseDown(_1=>[object MouseEvent], _2=>undef)
            [c]EventHandler.dispatch(_1=>function isc_c_EventHandler_handleMouseDown(_1,_2){if((isc.Browser.isTouch||navigator.pointerEnabled)&&!_2)return;var _3=isc.EH;_3.$km=true;var _4=_3.doHandleMouseDown(_1,_2);_3.$km=false;return _4}, _2=>[object MouseEvent])
            anonymous(event=>[object MouseEvent])
        ,
        Stack trace:
        
        
            MessagingDMIClient.call(_1=>"addToLog", _2=>08:27:22.928:MDN4:ERROR:MessagingDMIClient:Expected Array as second arg or props.args in MessagingDMIClient.call(), but got:lastMouseDown,
        Stack trace:
        
        
            MessagingDMIClient.call(_1=>"staticForm.setValue", _2=>lastMouseDown,, _3=>undef)
            DebugTarget.displayMouseDownTarget()
            anonymous(_1=>[object MouseEvent], _2=>undef)
            thunk(_1=>[object MouseEvent], _2=>undef)
            doHandleMouseDownObservation([object MouseEvent], undef)
            [c]EventHandler.handleMouseDown(_1=>[object MouseEvent], _2=>undef)
            [c]EventHandler.dispatch(_1=>function isc_c_EventHandler_handleMouseDown(_1,_2){if((isc.Browser.isTouch||navigator.pointerEnabled)&&!_2)return;var _3=isc.EH;_3.$km=true;var _4=_3.doHandleMouseDown(_1,_2);_3.$km=false;return _4}, _2=>[object MouseEvent])
            anonymous(event=>[object MouseEvent])
        ,, _3=>undef)
            LogViewer.addToLog(_1=>"08:27:22.928:MDN4:ERROR:MessagingDMIClie..."[810], _2=>undef)
            anonymous(message=>"08:27:22.928:MDN4:ERROR:MessagingDMIClie..."[810])
            thunk(message=>"08:27:22.928:MDN4:ERROR:MessagingDMIClie..."[810])
            addToMasterLogObservation("08:27:22.928:MDN4:ERROR:MessagingDMIClie..."[810])
            [c]Log.addLogMessage(_1=>2, _2=>"Expected Array as second arg or props.ar..."[767], _3=>"MessagingDMIClient", _4=>undef, _5=>undef)
            [c]Log.log(_1=>2, _2=>"Expected Array as second arg or props.ar..."[767], _3=>"MessagingDMIClient", _4=>undef, _5=>[MessagingDMIClient ID:undefined], _6=>undef)
            [a]MathFunction.logMessage(_1=>2, _2=>"Expected Array as second arg or props.ar..."[892], _3=>undef, _4=>undef)
            [a]MathFunction.logError(_1=>"Expected Array as second arg or props.ar..."[892], _2=>undef)
            ** recursed on MessagingDMIClient.call
        ...

        Comment

        Working...
        X