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

Right click on ListGrid header throws java.lang.IllegalArgumentException

$
0
0
SGWT: 4.1p.0.0 04/15/2014 12:56
FF: 26
Code:

@Override
public void onModuleLoad() {

        new ListGrid() {{
                setFields(new ListGridField("id", "ID"), new ListGridField("name", "Name"));
                setData(createData());
                setSelectionType(SelectionStyle.MULTIPLE);
                setSelectionAppearance(SelectionAppearance.CHECKBOX);
                setHeight(400);
        }

        private ListGridRecord[] createData() {
                ListGridRecord[] records = new ListGridRecord[10];
                for(int i = 0; i < 10; i++){
                        records[i] = new ListGridRecord();
                        records[i].setAttribute("id", i);
                        records[i].setAttribute("name", i % 2 == 0 ? "FOO" : "BAR");
                }
                return records;
        }}.show();
}

Right click header, observer exception.
Code:


java.lang.IllegalArgumentException: Something other than a Java object was returned from JSNI method '@com.smartgwt.client.widgets.grid.ListGrid::displayHeaderContextMenu(Lcom/smartgwt/client/widgets/Canvas;[I)': 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:271)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.smartgwt.client.widgets.grid.ListGrid.displayHeaderContextMenu(ListGrid.java)
    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:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    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:213)
    at sun.reflect.GeneratedMethodAccessor28.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:292)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Thread.java:724)


Viewing all articles
Browse latest Browse all 4756

Trending Articles