ui:style example doesn't work

32 views
Skip to first unread message

Thad

unread,
Jan 9, 2012, 5:07:07 PM1/9/12
to Google Web Toolkit
The "Hello Stylish World" example (http://code.google.com/webtoolkit/
doc/latest/DevGuideUiBinder.html#Hello_Stylish_World) shows that there
can be more than one ui:style element, but when I try that with
my .ui.xml file in Eclipse, I'm told that only one ui:style element is
allowed.

When I run GWT Designer in design mode, I'd like to see both the CSS
from the current page and the CSS from the stylesheet injected in
onModuleLoad(). I can see the effects of both running in DevMode, but
not in Designer.

Aidan O'Kelly

unread,
Jan 10, 2012, 12:59:13 PM1/10/12
to google-we...@googlegroups.com
No idea about desginer, but to get 2 <ui:style> elements, make sure you include a 'field' attribute in any <ui:style> elements other than the default.

<ui:style> .foo { } </ui:style>
<ui:style field="second"> .bar { } </ui:style>

Then reference {style.foo}, {second.bar} 



--
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.


Thad

unread,
Jan 10, 2012, 3:51:51 PM1/10/12
to Google Web Toolkit
Okay, I can use <ui:style field='global' src="../MyApp.css"></
ui:style> but, for example, the .gwt-Button style set in ../MyApp.css
does not show in GWT Designer's Design mode, though it does in devmod.
The GWT Designer properties panel for the buttons say "There are no
CSS files referenced from module or HTML."
Reply all
Reply to author
Forward
0 new messages