CssResource in UiBinder

34 views
Skip to first unread message

Stefano Pulze

unread,
Feb 27, 2015, 9:38:37 AM2/27/15
to google-we...@googlegroups.com
Hi all,

Can anyone explain me how tu use (and reuse) CssResource inside a UiBinder?

I don't understand if I have to make a ClientBundle with some CssResources interface 
and use with the tag <ui:with .... /> inside a UiBinder.

Be CssResource ensureInjected() ?

Thanks 

Thomas Broyer

unread,
Feb 27, 2015, 9:45:12 AM2/27/15
to google-we...@googlegroups.com
Either you use <ui:style> to get an implicit ClientBundle and CssResource (you can define an extended interface, other source CSS files to use, and inject the resulting CssResource into a @UiField), and it'll be automatically ensureInjected().
Or you use an existing ClientBundle and CssResource (with existing source CSS files) that you reference through <ui:with> (either GWT.create()d and possibly injected into a @UiField, or taken from a @UiField(provided=true), and you have to call ensureInjected() yourself (as with any other object used through <ui:with>)
Reply all
Reply to author
Forward
0 new messages