It turns out, this is the way GWT does things. When you load the page, the GWT *.nocache.js file creates an iframe in your page that has the id of your module, something like this (module name highlighted):
Well, this all worked before I did my refactoring, and since the clues pointed to different documents, it seemed that this iframe could be the issue. I had renamed my module too, so I searched for another DOM element with this id. There was one. This was the problem. My DOM had 2 elements with the same id.
The fix: I changed the module name in the *gwt.xml file. ex. <module rename-to=’testiframeid‘> I could have changed the id of the other div, but since this was code that someone else wrote, I wasn’t completely sure if this id was needed for other functionality.
I tried this in a stand-alone GWT project to confirm this was always a problem. This only takes a few minutes to try. Steps:
- Create a new GWT application
- Compile/Run – no problems
- Insert a dom element with the same id as your module name (defined in *.gwt.xml : <module rename-to=’testiframeid‘>)
- Compile/Run – Application will not work.