I went through the documentation. as i understand if i need to get the information i would have to end up using ModuleDefLoader and load the module again and get the ModuleDef instance to fetch the stylesheet details (Not sure of the issues i might run into if i reload the module def). I am looking at a approach to retrieve the info runtime rather than compile time. I am sure GWT would have a location which would be storing this information in javascript objects. Has anyone tried such a thing before ?
Cheers! On Mar 2, 2:32 pm, Chris Lercher <[email protected]> wrote: > Hi, > > maybe not the greatest approach, but just because you ask for "any > other approaches": You could load the .gwt.xml file on the server via > classLoader.getResourceAsStream(), parse it as XML, and look for the > <stylesheet> tags. > > Also, you may find the class com.google.gwt.dev.cfg.ModuleDef helpful > in some way (?) It has a getStyles() method, but I haven't looked into > how you would get hold of an instance of ModuleDef. > > Chris > > On Mar 2, 8:17 am, keyboard_samurai <[email protected]> wrote: > > > > > That was my worst case approach if GWT didnt have any API mechanism to > > retrieve information from whats been set in GWT.XML. ;) > > > Any other approaches available please do let me know?? > > > Cheers! > > > On Mar 2, 11:46 am, Fazeel Kazi <[email protected]> wrote: > > > > I think what you can do is search for all <link> tags in the document, > > > since > > > GWT will ultimately convert all <stylesheet> into <link> tags included in > > > the <head> of the page. > > > > On Sun, Feb 28, 2010 at 5:40 PM, keyboard_samurai <[email protected]> > > > wrote: > > > > Hi, > > > > > we are setting stylesheet using the automatic resource inclusion i.e > > > > by adding a <stylesheet src="_css-url_"/> entry in gwt.xml. Is there > > > > any way i can access this information using API's ? The end result i > > > > need is all the list of css url's included for the current module. > > > > > Do let me know if this is possible or any workarounds available rather > > > > than using hardcoded css filenames in my code. > > > > > Thank You! > > > > > Cheers! > > > > > -- > > > > 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]<google-web-toolkit%2Bunsubs > > > > [email protected]> > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/google-web-toolkit?hl=en. -- 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.
