try MyCssResource css = GWT.create(MyCssResource.class); css.ensureInjected();
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/index.html?com/google/gwt/resources/client/CssResource.html On Dec 20, 8:33 pm, Dazza <[email protected]> wrote: > I have an existing GWT project that uses > StyleInjector.injectStylesheet and StyleInjector.setContents from the > GWT Incubator. I have upgraded to GWT 2.0 and see that StyleInjector > is now an official GWT class. Unfortunately the two methods I am > using (injectStylesheet and setContents) are now deprecated and I am > not sure how best to replace their usage. > > On initial display of the page I call StyleInjector.injectStylesheet > to inject some CSS styles with values specific to the data displayed. > At a later point when I refresh the data I need to change the CSS > style values, so I call StyleInjector.setContents which replaces the > styles I originally created. I may end up replacing the CSS styles > thousands of times in the course of a user session. > > The none deprecated methods inject, injectAtStart and injectAtEnd do > not seem to do a replace. Is that correct? What am I supposed to do? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
