• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GWT Project just shows a blank page if empty body tag is used

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i've got a problem with my test GWT Project,
if i remove all static content from within the body tag, nothing of the rootpanel gets drawn.
It works fine with the static content present in the base html file though.

I might add, that my rootpanel contains a menubar, which is not drawn if the 2 default project
items in the static html file are removed.


(In the below listing, the part between the ' =========================================================').

It seems that GWT javascript does not replace the documents content without those fields.
If its empty, as suggested for a complete dynamic app, the page is blank. By looking at the Page Source, its exactly the content of the static html file.


Can anyone explain what i'm missing here, or how to trigger GWT 2.4.0 to work correctly on an empty body?

Thanks


 
Ron Meyer
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anyone, please?
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would say instead on an empty body it is always advisable to display the content using the ID.
For example
.
Then in body use


I think this should do it.
 
Ron Meyer
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much - that helped indeed.
But I think there is a Bug in GWT because the sample code says using empty Body and empty .get() can be used.

In fact it only worked by using the div with an id, as you pointed out.

I now use:



and
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mad Marty wrote:But I think there is a Bug in GWT because the sample code says using empty Body and empty .get() can be used.



There is no Bug in GWT....

try empty Body as :



And in Module load:



It should work fine. Infact in all of my projects I have used the same to add the Widgets.
 
We noticed he had no friends. So we gave him this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic