I want to know how to use already existing html templates with gwt because for my project I have html design that i'm obliged to use thanks
Asked
Active
Viewed 198 times
-1
-
3Welcome to StackOverflow! Please have a look at http://stackoverflow.com/help/how-to-ask before posting a question. – manub Mar 16 '16 at 15:28
1 Answers
1
You have two options.
- Copy your HTML into a UiBinder template, putting it inside an HTMLPanel. Then you can selectively replace some HTML elements with GWT widgets where additional functionality is required, and reference these widgets in your corresponding view. Alternatively, you can reference elements, if you don't need widget functionality.
This option is the only option if you have multiple HTML templates and you want to turn them into a single-page GWT app.
- Use your HTML as a host page, adding ids to the elements you want to make interactive. Then you can get these elements from your GWT code and manipulate them as necessary.

Andrei Volgin
- 40,755
- 6
- 49
- 58
-
and if my templates have multiple Html pages can i use these options ? – Mehdi Chekir Mar 17 '16 at 08:06
-
You have to turn each "page" into a separate view within your GWT app. Each view can use a UiBinder template. – Andrei Volgin Mar 17 '16 at 08:28
-
ok and I can use both option you mentionned ? and what about the UIDOM – Mehdi Chekir Mar 17 '16 at 12:44