PDA

View Full Version : GXT/GWT throws error when including id for body tag



maverick79
26 Nov 2009, 4:47 AM
I had the <body id="myid"> tag on my page and the GXT/GWT throws the error "undefined is null or not an object". When I replace it with <body> it works fine. I have to include id to make some stuff work. Can someone explain it why does it happen and how to solve it.

Thanks

sven
26 Nov 2009, 4:59 AM
I cannot reproduce this. Is the id probably the same than the appname?

maverick79
26 Nov 2009, 5:09 AM
yeah the id is the same as the appname. I had the following in MyApp.gwt.xml

<module rename-to='myapp'>

and the body tag is

<body id="myapp">

there is a lot of code so i can't paste the stuff here. Even if i don't add anything to the RootPanel in onModuleLoad(), I still get that error.

sven
26 Nov 2009, 5:12 AM
There is a GWT issue preventing you from having an element with the id same as the appname. I cannot find the ticket anymore, but i remember it a little bit ;)

maverick79
26 Nov 2009, 5:21 AM
There is a GWT issue preventing you from having an element with the id same as the appname. I cannot find the ticket anymore, but i remember it a little bit ;)

Thanks Sven. I will try a workaround ;)

sven
26 Nov 2009, 5:23 AM
Simple change the id ;)