aspose file tools*
The moose likes GWT and the fly likes Loading html dynamically from file instead of having static page. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Loading html dynamically from file instead of having static page." Watch "Loading html dynamically from file instead of having static page." New topic
Author

Loading html dynamically from file instead of having static page.

Tadas Davidsonas
Greenhorn

Joined: Aug 17, 2010
Posts: 9
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.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

You can always have a servlet/JSP serve you the HTML on the fly. Or did I misunderstand your question?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
ahmed dohar
Greenhorn

Joined: Oct 06, 2009
Posts: 26
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:


Federico Kereki
author
Ranch Hand

Joined: Aug 27, 2010
Posts: 31
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!

Great fan of Open Source, Linux, and web development with GWT; all of these come together for my ESSENTIAL GWT book!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading html dynamically from file instead of having static page.
 
Similar Threads
Essential GWT: Building for the Web with Google Web Toolkit 2 (Developer's Library)
Problem using ClassLoader
"jsp:include page=..." and refresh
should all the pages of a web-app be in jsps or servlets
how to get HTML div id name from RootPanel