in what situation GWT will generate the CSS class name in random?

97 views
Skip to first unread message

wahaha

unread,
Nov 23, 2011, 9:57:12 PM11/23/11
to Google Web Toolkit
in what situation GWT will generate the CSS class name in random?

and in what situation it will remain the original name?

for example:
1. use {style.xx} in ui.xml
2. use {xx} in ui.xml
3. use widget.setStyleClassName() in java code

Thomas Broyer

unread,
Nov 24, 2011, 4:09:18 AM11/24/11
to google-we...@googlegroups.com
CSS class name obfuscation only happen in CssResource; and a <ui:style> in a UiBinder template is a form of CssResource.

So only case "1" in your list would use an obfuscated class name, because 'style' references (by default) a <ui:style>, i.e. a CssResource; {xx} would use the value of xx (any @UiField named 'xx' in your class, and/or anything with a field="xx" in your ui.xml), and setStyleName uses the argument give verbatim.

wahaha

unread,
Nov 24, 2011, 9:48:46 PM11/24/11
to Google Web Toolkit
does this will affect:

"@external .t-label" in ui.xml

Reply all
Reply to author
Forward
0 new messages