I use a lot of HTML panels so I can use native html for as much layout and 
styling as possible for performance reasons. I try and minimize the number 
of widgets I use which is especially helpful on mobile devices. As a 
result, I use quite a lot of css class references to either local uibinder 
styles or styles defined in a global application css resource. The problem 
is that it results in JS code such as the following:

f_HTMLPanel1 = new HTMLPanel_0((sb_2 = new StringBuilder_0 , 
sb_2.impl.string += "<span id='" , $append_6(sb_2, htmlEscape(domId0)) , 
sb_2.impl.string += "'><\/span> <div class='" , $append_6(sb_2, 
htmlEscape('GKOWVOJDGN')) , sb_2.impl.string += "'> <div class='" , 
$append_6(sb_2, htmlEscape('GKOWVOJDHN')) , sb_2.impl.string += "'> <span 
id='" , $append_6(sb_2, htmlEscape(domId1)) , sb_2.impl.string += 
"'><\/span> <span id='" , $append_6(sb_2, htmlEscap

The obfuscated class names are clearly static and known at compile time and 
I would expect them to be inlined in the strings e.g.

<\/span> <div class=''GKOWVOJDGN'....

One of the proposed benefits of using a css resource is shorter class 
names, However, In reality I would be better of using styles directly 
loaded in my startup page. The net result is that there are far to many 
string concatenations and code bloat. This really adds up on a large 
project and especially hurts when building things like iPad applications.  

For now I am disabling SafeHTMLTemplates with the following

<set-configuration-property name="UiBinder.useSafeHtmlTemplates" 
value="false"/>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to