Problem: CSS import is only half functional

6 views
Skip to first unread message

Peter

unread,
Nov 12, 2010, 5:59:26 AM11/12/10
to Google Web Toolkit
I'fe got a problem with using CSS classes in my masks definitions.
I implemented the CSS files as a resource (ClientBundle Interface) and
made it accessible for the java classes and the myview.ui.xml files
( <ui:with field='res' type='xxx.xx.xx'/> ).

Now when I reference this class:
<mywidget styleName="res.css.className">

.. two things happen:
- In the generated HTML the class name is replaced by a correct fully-
qualified-name generated by GWT.
- But this css-class is not available in the final, merged CSS file
(generated by GWT) that is sent to the browser. I can check this in
firebug.

So the first functionality of the GWT compilation works fine, but the
second part doesn't.
Suprisingly: I'm integrated two CSS resources and the first one works
fine. Only the second one doesn't. I checked any differences between
those but couldn't find anything.

Can anybody help? Why could this be? What could I propably have
missed?

TIA and kind regards,
Peter

Thomas Broyer

unread,
Nov 12, 2010, 9:31:04 AM11/12/10
to Google Web Toolkit
Probably the ensureInjected() call on your CssResource, that will
actually inject the CSS stylesheet into the document.

Peter

unread,
Nov 15, 2010, 7:11:08 AM11/15/10
to Google Web Toolkit
Thank you very much Thomas!
This indeed seems to solve my problem :-)

Kind regards,
Peter

P.S. Please excuse my spelling mistakes. It was Friday and I was in a
hurry :-/


On 12 Nov., 15:31, Thomas Broyer <t.bro...@gmail.com> wrote:
> On 12 nov, 11:59, Peter <pent...@gmail.com> wrote:
>
>
>
> > I'fe got a problem with usingCSSclasses in my masks definitions.
> > I implemented theCSSfiles as a resource (ClientBundle Interface) and
> > made it accessible for the java classes and the myview.ui.xml files
> > ( <ui:with field='res' type='xxx.xx.xx'/> ).
>
> > Now when I reference this class:
> > <mywidget styleName="res.css.className">
>
> > .. two things happen:
> > - In the generated HTML the class name is replaced by a correct fully-
> > qualified-name generated by GWT.
> > - But thiscss-class is not available in the final, mergedCSSfile
> > (generated by GWT) that is sent to the browser. I can check this in
> > firebug.
>
> > So the first functionality of the GWT compilation works fine, but the
> > second part doesn't.
> > Suprisingly: I'm integrated twoCSSresources and the first one works
> > fine.Onlythe second one doesn't. I checked any differences between
Reply all
Reply to author
Forward
0 new messages