gwt + templete

52 views
Skip to first unread message

Assiya EL

unread,
May 18, 2012, 5:46:53 PM5/18/12
to google-we...@googlegroups.com
hi all ,

I would like to integrate a templete html / css with my application gwt 2.4,  it is possible ??

--
 
Assiya EL
Master Qualité du Logiciel 



Plz consider environment - Only print this if necessary


Joseph Lust

unread,
May 19, 2012, 2:05:47 PM5/19/12
to google-we...@googlegroups.com
Assiya,

Could you please clarify what you mean by "template HTML?"

GWT has facilities for templated HTML:
  1. UiBinder for templates for Widgets (i.e. like a toolbar) and entire screens (i.e. like page layouts for a blog)
  2. @Template annotation based SafeHtmlTemplates for quickly generating sanitized dynamic raw HTML output.

UiBinder is the most commonly used case in GWT for making page layouts. The @Templates are used for components requiring lost of HTML markup like the rows/columns of datagrids.

Using a UiBinder you could easily create a "template" of the standard page for say a forum (i.e. like this GWT Google Groups page) and then dynamically insert the content (comments), titles, page header...etc into your template. That is how this forum page works, just swapping the dynamic content into an otherwise static page template.

I hope that helps.

Sincerely,
Joseph

Assiya EL

unread,
May 19, 2012, 2:16:38 PM5/19/12
to google-we...@googlegroups.com
Hi Joseph ,

thank you for your reply , but i don't work with uibinder , just a class with entry point 

any other solution ??

2012/5/19 Joseph Lust <lifeo...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/_oKpvLo5N8YJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Joseph Lust

unread,
May 19, 2012, 2:24:40 PM5/19/12
to google-we...@googlegroups.com
Assiya,

Getting started with UiBinder is quite simple and easy. I've found it far easier than the classic approach of separate CSS/HTML/JS files and trying to track everything through the DOM.

What is your restriction against using UiBinder other than not yet having experience with it? You an achieve the same effects programmatically using calls like new Panel(), and explicitly setting css rules, but it will take far longer to achieve that way and be far harder to maintain. Can you please explain what you hope to achieve and what your restrictions are?


Sincerely,
Joseph 

Assiya EL

unread,
May 19, 2012, 2:37:35 PM5/19/12
to google-we...@googlegroups.com
I did not choose,  the choice is imposed  , I call on my entry point  my classes witha my menu, my grid ........... and I want to integrate a style for every page divided intopanel: header = menu, body = grid, footer = ........ etc. 
it is clear ?

2012/5/19 Joseph Lust <lifeo...@gmail.com>


Sincerely,
Joseph 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Joseph Lust

unread,
May 19, 2012, 4:14:09 PM5/19/12
to google-we...@googlegroups.com
Assiya,

I see. Given the imposed restrictions, you can still do a lot as far as styling with CSSResources and ClientBundle. You could for example take the CSS and styles you'd like each page to have and place them in an archetype widget like MyCustomPage. Then your pages could extend this and call a parent method as needed like getInfoPanelStyle() and set classes programmatically this way on child widgets like InfoPanels. Now you could control the styles used in all widgets through that single parent class.

As far as other methods to make a robust template in GWT sans UiBinder, I'd like to know from other GWT fourm users how they've worked within this restriction.



Sincerely,
Joseph
Reply all
Reply to author
Forward
0 new messages