Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGrid.getSortDirection () throws IllegalArgumentException

$
0
0
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.

Viewing all articles
Browse latest Browse all 4756

Trending Articles