Sorry, my bad (it did turn up: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/40fed6fce8c222f6). It just isn't showing up in the search results for some reason.
On Mar 11, 10:32 am, dougx <douglas.lin...@gmail.com> wrote: > Sorry if this is a double post; I thought I posted a message about > this before but it's been 24 hours and it still hasn't shown up... > > So, long story short, I can't get the "@if user.agent" syntax to work > in gwt 2.0.3. > Does anyone know how to use this correctly? > > This is my style sheet: > .Box { > border: 1px solid #000;} > > @if user.agent ie6 ie7 ie8 { > .Box { > background: #f00; > }} > > @if (com.client.Com.Check()) { > .Box { > background: #0f0; > }} > > @else { > .Box { > background: #00f; > } > > } > > And this is the code to Com::Check: > public static boolean Check() { > if (Navigator.getUserAgent().toLowerCase().contains("msie")) > return(true); > else > return(false); > } > > The style output is style background: #0f0 on all versions on IE. That > is, the @if user.agent query string isn't working at all. > > I've tried the example here too, and that also doesn't work for > me:http://code.google.com/p/google-web-toolkit/wiki/CssResourceCookbook > > I'm sure I've got this working before. Is there a syntax change or > something I should be using? I've seen some example around where > people are going @if user.agent msie7 or example, but that doesn't > work for me either. :( > > ~ > D. -- 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-tool...@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.