SGWT 2.4, 2.5 nightly, gwt 2.1.1.
If I add a new tab in the event handler using this code (can be run as is)
I am getting the following stack trace, and while the tab is being created, the label is not being shown in the tab pane, which is not particularly helpful:
If I manually select the first tab, and then the newly created tab, the label inside it is shown correctly. I added the selection of tab as a deferred action, too (as per code above), but it doesn't help either.
The same code works in IE8, and I think it worked in chrome, but can't test with it at the moment, because the gwt plugin is acting stupid.
any hints on how to fix this?
regards,
Andrius J.
If I add a new tab in the event handler using this code (can be run as is)
Code:
VLayout vl = new VLayout(5); final TabSet ts = new TabSet(); ts.addTab(new Tab("First")); vl.setWidth(500); vl.setHeight(200); vl.addMember(ts); Button button = new Button("Add tab"); vl.addMember(button); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { final Tab t2 = new Tab("Second" + SC.generateID()); t2.setPane(new Label(SC.generateID("my label"))); ts.addTab(t2); Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { @Override public void execute() { ts.selectTab(t2); } }); } }); vl.draw();
Code:
[ERROR: Uncaught exception escaped. com.google.gwt.core.client.JavaScriptException: (null): null at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126) 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.tab.TabSet.selectTab(TabSet.java) at com.ajaxelements.client.AjaxElementsDemo$1.onClick(AjaxElementsDemo.java:66) at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:98) at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178) at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126) 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:214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:619)
The same code works in IE8, and I think it worked in chrome, but can't test with it at the moment, because the gwt plugin is acting stupid.
any hints on how to fix this?
regards,
Andrius J.
Comment