• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Loading html dynamically from file instead of having static page.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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!
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!