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

self.redraw is not a function -- error after upgrading to SmartGWT 5.0

$
0
0
We have a running code that worked before with SmartGWT 3.1, but then stopped to working after we upgrade to 5.0 (we are using 5.0-p20141218)

The error message was this

Code:

Uncaught exception escaped: com.google.gwt.core.client.JavaScriptException
(TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(527), JavaScript object(239), JavaScript object(532)]): self.redraw is not a function
See the GWT exception log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling.

The offending code is this line (I show a few more line as the context), which I couldn't see anything wrong

Code:

selectItemStackingOption.setValueMap(stackingValueMap);
selectItemStackingOption.setValue((String)null);
selectItemStackingOption.setDefaultToFirstOption(true);
selectItemStackingOption.redraw();  // <--- offending line
renderingParams.setDefaultChartStackingOption();

In my Eclipse debugger, I could see that the SelectItem seems to be a valid one (the lines preceding the offending line also worked). I am attaching a screenshot showing the content of this SelectItem

Details info:

SmartClient Version: v10.0p_2014-12-18/PowerEdition Deployment (built 2014-12-18)

Browser: Firefox 26.0

Stacktrace as shown in the console of Eclipse

Code:

17:15:38.064 [ERROR] [nara] 17:15:38.065:WARN:TabBar:isc_TabSet_0_tabBar:ignoring bad or negative width: -142 [enable 'sizing' log for stack trace]

com.smartgwt.client.core.JsObject$SGWT_WARN: 17:15:38.065:WARN:TabBar:isc_TabSet_0_tabBar:ignoring bad or negative width: -142 [enable 'sizing' log for stack trace]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    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:576)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.widgets.BaseWidget.setProperty(BaseWidget.java)
    at com.smartgwt.client.widgets.BaseWidget.setAttribute(BaseWidget.java:975)
    at com.smartgwt.client.widgets.Canvas.setHeight(Canvas.java:9255)
    at com.alcatel_lucent.aware.nara.client.rendering.AnaBaseLayout.createLayoutMiddle(AnaBaseLayout.java:265)
    at com.alcatel_lucent.aware.nara.client.rendering.AnaBaseLayout.createLayoutAll(AnaBaseLayout.java:370)
    at com.alcatel_lucent.aware.nara.client.rendering.AnaBaseLayout.cb_InitLayout(AnaBaseLayout.java:210)
    at com.alcatel_lucent.aware.nara.client.rendering.AnalyzeMain$1.onSuccess(AnalyzeMain.java:97)
    at com.alcatel_lucent.aware.nara.client.rendering.AnalyzeMain$1.onSuccess(AnalyzeMain.java:1)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:259)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:576)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
    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:347)
    at sun.reflect.GeneratedMethodAccessor145.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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(Unknown Source)


Viewing all articles
Browse latest Browse all 4756

Trending Articles