GWT has bug in Dev mode for Chrome

It happens when trying to check visibility of component. So be careful withcomponent.isVisible()as it fails on Chrome.Same thing is for GXT (extgwt from Sencha) as it calls underlaying GWT’s isVisible()(UncaughtExceptionHandler.java:23) 2012-07-30…

It happens when trying to check visibility of component. So be careful with
component.isVisible()
as it fails on Chrome.

Same thing is for GXT (extgwt from Sencha) as it calls underlaying GWT’s isVisible()

(UncaughtExceptionHandler.java:23) 2012-07-30 12:55:02,147 [ERROR] java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.dom.client.Element
java.lang.ClassCastException:
java.lang.String cannot be cast to com.google.gwt.dom.client.Element
    at com.google.gwt.dom.client.DOMImpl.getParentElement(DOMImpl.java)
    at com.google.gwt.dom.client.Node$.getParentElement$(Node.java:184)
    at com.google.gwt.user.client.DOM.getParent(DOM.java:892)
    at com.extjs.gxt.ui.client.core.El.getParent(El.java:1274)
    at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1889)
    at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1874)
    at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1898)
    at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:767)
    at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:754)
    at pl.touk.mnp.frontend.webapp.client.widgets.RichDateComboFilter.handleBeforeLoadEvent(RichDateComboFilter.java:258)

When using development mode, better use Firefox. In production Chrome works well without bugs.

EDIT:
When using shallow visibility checking
component.isVisible(false);
the error can be avoided. GWT isn’t traversing through DOM tree and it doesn’t blow with an exception but you have to check whether shallow visibility checking is sufficient (in most cases it is).

You May Also Like

4Developers 2010 Review

I've been to 4Developers in 2009 in Cracow, together with Tomasz Przybysz and we had very nice impressions, no wonder then I wanted to signed up for 2010 edition in Poznań as well. Tomasz was sick, but Jakub Kurlenda decided to come with me. This time...I've been to 4Developers in 2009 in Cracow, together with Tomasz Przybysz and we had very nice impressions, no wonder then I wanted to signed up for 2010 edition in Poznań as well. Tomasz was sick, but Jakub Kurlenda decided to come with me. This time...

Oracle SQL Developer dla MSSQL

Ostatnio poznałem ciekawe narzędzie do manipulacji schematami bazy danych. Oracle SQL Developer się nazywa i nie służy tylko do baz Oracle. Ponieważ pracuję obecnie przy projekcie opartym o MS SQL, to potrzebowałem możliwości połączenia z M...Ostatnio poznałem ciekawe narzędzie do manipulacji schematami bazy danych. Oracle SQL Developer się nazywa i nie służy tylko do baz Oracle. Ponieważ pracuję obecnie przy projekcie opartym o MS SQL, to potrzebowałem możliwości połączenia z M...