Hi all,
I’m using smartgwt in order to develop an example application and I found following error whit IE when applying MVP pattern.
- the SmartGWT version is 2.5 (also 2.4); IE 6-7-8-9
- GWT SDK 2.4.0 (also 2.3.0)
Issue:
After creating a new gwt project with eclipse helios i have added smargwt library and <inherits name=“com.smartgwt.SmartGwt”/>. The application run normally.
After that i following gwt Contacts example in order to modify my application whit MVP pattern.
I have two views (similar to each other, less than a label) with 2 button, and when i press one, application make switch to second view.
After that, with IE the problem is try to change view: the following error is showed:
18:04:06.305 [ERROR] [xeniasoccer] 18:04:06.302:TMR9:WARN:Log:Error: ‘Impossibile ottenere il valore della proprietà ‘currentStyle’:null object or undefined’ in http://127.0.0.1:8888/xeniasoccer/sc/modules/ISC_Core.js at line 1873
com.smartgwt.client.core.JsObject$SGWT_WARN: 18:04:06.302:TMR9:WARN:Log:Error: Can not get the value of the ‘currentStyle’: Object invalid or undefined’ in http://127.0.0.1:8888/xeniasoccer/sc/modules/ISC_Core.js at line 1873
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.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(Unknown Source)
I found that the problem is this statement:
container.clear();
in the my presenter method:
public void go(final HasWidgets container) {
bind();
container.clear();
container.add(display.asWidget());
}
if i remove container.clear() (container is RootPanel.get()) the error isn’t showed but the different views are queued on the page.
Any ideas?
Thanks, Vico