Hello,
I get the following exception, when I try to set a PickListSort for a SelectItem:
This seems to be cast within smartGWT:
It seems, that there is a cast implemented in this method, which doesnt fit SelectItem, as it doesnt inherit from com.smartgwt.client.widgets.BaseWidget
I get the following exception, when I try to set a PickListSort for a SelectItem:
Code:
13:38:11.831 [ERROR] [APP] Uncaught exception escaped java.lang.ExceptionInInitializerError: null at ... Caused by: java.lang.ClassCastException: Cannot cast com.smartgwt.client.widgets.form.fields.SelectItem to com.smartgwt.client.widgets.BaseWidget at java.lang.Class.cast(Class.java:3005) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:163) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:57) 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.invokeNativeVoid(ModuleSpace.java:289) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at com.smartgwt.client.widgets.form.fields.SelectItem.setPickListSort(SelectItem.java) at ...
Code:
public native void setPickListSort(SortSpecifier[] sortSpecifiers) /*-{ var self = this.@com.smartgwt.client.widgets.BaseWidget::getJsObj()(), specifiers = @com.smartgwt.client.util.JSOHelper::convertToJavaScriptArray([Ljava/lang/Object;)(sortSpecifiers); if (self != null && self.pickList != null) self.pickList.setSort(specifiers); else { var configJS = this.@com.smartgwt.client.core.DataClass::getAttributeAsJavaScriptObject(Ljava/lang/String;)("pickListProperties"); if (configJS == null) { configJS = {}; this.@com.smartgwt.client.core.DataClass::setAttribute(Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)("pickListProperties", configJS); } configJS.initialSort = specifiers; } }-*/;
Comment