• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Loading html dynamically from file instead of having static page.

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

Just wondering about GWT possibilities.

The problem is like this: I want to load html and css templates dynamically instead of having static html page.

What is the best way to do it?

I know that it is possible to load html to Rootpanel id but is it possible to load entire html page dynamically?

And after loading html I'll still need to add some buttons GWT classes.(sometimes GWT is ugly about doing this after loading plain html).

Thank you.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can always have a servlet/JSP serve you the HTML on the fly. Or did I misunderstand your question?
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, It is very easy all the content of your static html put it in String variable then add this variable in HTML widget like this:


 
author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For dynamic CSS work, you could give a look to CSS resource bundles.

As to loading HTML, you could get the code from the server by using RPC, but wouldn't that somehow beat the idea of client-side code?

Hope this helps!
 
Look! It's Leonardo da Vinci! And he brought a tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic