Re: GWT 2 External Css not working

2009-11-10 Thread shahid

By debuggin the code I can see that the getText() method of the
ResourceBundle returns an empty string !!!


On Nov 9, 5:03 pm, shahid shahidza...@gmail.com wrote:
 I am using 2 external CSS stylesheets in my application but none of
 their styles apply anywhere when I load the app. The way I have set it
 up is as follows:

 I have placed the 2 CSS files in a folder named public  at the same
 level as the gwt.xml file.

 In my gwt.xml, I have:
 inherits name=com.google.gwt.resources.Resources /

 I have a ResourceBundle interface as follows describing the 2 CSS
 resources:

 public interface ResourceBundle extends ClientBundle {

         public static final ResourceBundle INSTANCE = GWT.create
 (ResourceBundle.class);

         @Source(com/docobo/keswick/keswickweb/public/gxt-all.css)
         public Css gxtall();

         @Source(com/docobo/keswick/keswickweb/public/gxt-gray.css)
         public Css gxtgray();

        ..

 }

 Where the return type Css resource is an empty class extending
 CssResource:

 public interface Css extends CssResource { }

 In my onModuleLoad(), I injext the styles as follows:

         public void onModuleLoad() {
                 
 StyleInjector.inject(ResourceBundle.INSTANCE.gxtall().getText());
                 
 StyleInjector.inject(ResourceBundle.INSTANCE.gxtgray().getText());
                 ..
          }

 The application compiles and loads successfully and the CSS files are
 copied into war/module-folder/ but none of the syles are used or
 recognised anywhere in the application !!!
--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



GWT 2 External Css not working

2009-11-09 Thread shahid

I am using 2 external CSS stylesheets in my application but none of
their styles apply anywhere when I load the app. The way I have set it
up is as follows:

I have placed the 2 CSS files in a folder named public  at the same
level as the gwt.xml file.

In my gwt.xml, I have:
inherits name=com.google.gwt.resources.Resources /

I have a ResourceBundle interface as follows describing the 2 CSS
resources:

public interface ResourceBundle extends ClientBundle {

public static final ResourceBundle INSTANCE = GWT.create
(ResourceBundle.class);

@Source(com/docobo/keswick/keswickweb/public/gxt-all.css)
public Css gxtall();

@Source(com/docobo/keswick/keswickweb/public/gxt-gray.css)
public Css gxtgray();

   ..
}

Where the return type Css resource is an empty class extending
CssResource:

public interface Css extends CssResource { }

In my onModuleLoad(), I injext the styles as follows:

public void onModuleLoad() {

StyleInjector.inject(ResourceBundle.INSTANCE.gxtall().getText());

StyleInjector.inject(ResourceBundle.INSTANCE.gxtgray().getText());
..
 }

The application compiles and loads successfully and the CSS files are
copied into war/module-folder/ but none of the syles are used or
recognised anywhere in the application !!!
--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---