Thank you Thomas. Putting @external next (left) to the style solved the problem :) regards shahid
On Nov 9, 3:30 pm, Thomas Broyer <[email protected]> wrote: > On Nov 9, 4:13 pm, shahid <[email protected]> wrote: > > > > > I have a GWT 1.7 application and I want to upgrade it to GWT 2 > > Milestone 2. The application uses 2 big external CSS files. In GWT 1.7 > > I had a public folder and put both the CSS files in the folder and my > > application compiled and worked fine. Now for GWT 2 I have created a > > ResourceBundle class and put all image sprites and CSS as follows: > > > public interface ResourceBundle extends ClientBundle { > > > public static final ResourceBundle INSTANCE = GWT.create > > (ResourceBundle.class); > > > @Source("com/web/tech/public/stylesheet1.css") > > public Css stylesheet1(); > > > @Source("com/web/tech/public/stylesheet2.css") > > public Css stylesheet2(); > > > @Source("com/docobo/keswick/keswickweb/public/images/ > > organisnew.gif") > > public ImageResource add_org(); > > > ..... > > } > > > The Css class is an empty class extending CssResource : > > > public interface Css extends CssResource{ > > > } > > > Then in my onModuleLoad() I use : > > > StyleInjector.inject(ResourceBundle.INSTANCE.stylesheet1().getText > > ()); > > StyleInjector.inject(ResourceBundle.INSTANCE.stylesheet2().getText > > ()); > > > When I compile I get the following error: > > > Rebinding > > com.docobo.keswick.keswickweb.client.ClientResources.ResourceBundle > > Invoking <generate-with > > class='com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' > > / > > > Creating assignment for gxt_gray() > > Replacing CSS class names > > [ERROR] The following unobfuscated classes > > were present in a strict CssResource: > > [ERROR] x-tab-scroller-left > > [ERROR] x-tab-strip-disabled > > [ERROR] ......loads of other styles > > > Fix by adding String accessor method(s) to the CssResource > > interface for obfuscated classes, or using an @external declaration > > for unobfuscated classes. > > > Following the above instruction when I use @external above all my > > style classes inside the CSS file I get the following error : > > It's not to be used "above", as a Java5 annotation; > seehttp://code.google.com/p/google-web-toolkit/wiki/CssResource#External... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
