Search code examples
javagwtextjsgxt

GXT3 HtmlEditor.setEnabled() causes exception if invoked before the component is displeyed


I use GWT2.5 with GXT 3.0.1 UI library. The application works in Development Mode while shows empty screen when compiled. The first simple loading GXT screen shows for a moment and then the webpage goes blank.

In many cases there are problems with:

validation-api-1.0.0.GA.jar
validation-api-1.0.0.GA-sources.jar 

Those are added.

GXT inherit looks like this:

<inherits name='com.sencha.gxt.ui.GXT' />

Can't really think of anything else...


---- UPDATE ----

I narrowed down the problem. Page content disappears because I create a dialog during construction of the panel. I moved dialog creation to lazy initialization. I see the contents, but dialog doesn't display upon dialog.show() method.

Something's wrong with the GXT Dialog implementation I guess.


Solution

  • I nailed it. Dialog contains HtmlEditor, which performed setEnabled(false) on. The call fails in compiled version, while works fine in dev.

    Clearly a bug. Call to setEnabled() in show() method or any other method after it's been displayed seems to fail also. So it's just a bug somewhere in the method itself.

    More details in Sencha premium support forum for those with access: http://www.sencha.com/forum/showthread.php?259570-GXT-3.0.1-application-goes-blank-when-compiled&p=951171#post951171