Environment: MS Windows, Eclipse 3.5 with GWT 2.0 plugin.
Testing on: FF (Win/Mac), Chrome (Win/Mac), IE7(Win)
Basic widget hierarchy:
- EntryPoint loads a DockLayoutPanel via UiBinder.
- in the center of the dock, loads a VerticalPanel
- the VerticalPanel has 3 custom composite widgets in my app's
namespace, each of which have to "appear" exclusively in the dock's
center pane when certain events are fired
Post-binding logic:
- after the EntryPoint creates and binds the UI, we need to "turn off"
2 of the 3 custom widgets.
- this is accomplished by the following code:
// turn off widget 1
vPanel.setCellHeight(customWidget1, "0px");
customWidget1.setVisible(false);
// turn off widget 2
vPanel.setCellHeight(customWidget2, "0px");
customWidget2.setVisible(false);
// turn on widget 3
vPanel.setCellHeight(customWidget3, "100%");
customWidget1.setVisible(true);
Error:
In IE7, the first reload in DevMode crashes with:
com.google.gwt.core.client.JavaScriptException: (Error): Invalid
argument.
number: -
2147024809
description: Invalid argument.
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript
(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke
(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative
(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid
(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid
(JavaScriptHost.java:107)
at com.google.gwt.dom.client.Element$.setPropertyString$
(Element.java)
at com.google.gwt.user.client.ui.CellPanel.setCellHeight
(CellPanel.java:104)
....
The next line in the stack trace is the first attempt at:
vPanel.setCellHeight(customWidget1, "0px");
FF (Win/Mac), Chrome (Win/Mac) all do this properly.
The IE7 dev plugin tells me gracefully that the server is
disconnected.
My eclipse console reports the above stack trace.
The end result is I have no application in IE.
(Now, someone is going to say: Why are you using VerticalPanels? Long
story, but I have not found a suitable replacement in the new UI
panels to handle sizing without becoming a PhD in CSS quirks.)
As I trace through the code, I am looking at this path:
- We programmatically set the cell height of the widget to 0px
(allowed by CSS) from its parent vPanel
- CellPanel.setCellHeight gets the widgetTd as an Element
- Element.setPropertyString sets the property string of 'height' to
'0px'
- this method is JSNI that sets this[name] = value in the
JavaScriptObject
I lose the code for a little while as it delegates through to
ModuleSpaceOOPHM(ModuleSpace).onLoad(TreeLogger).
When we try to exit the onModuleLoad via line 374 of
com.google.gwt.dev.shell.ModuleSpace
exit.invoke(null, true);
... we step into oblivion.
The user agent for this terrible show-stopping surprise for my
application is:
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
2.0.50727)"
Help!