BTW, I believe user.agent can only be one of: ie6 gecko gecko1_8
safari opera.

On Mar 10, 6:35 pm, dougx <[email protected]> wrote:
> Sorry, my bad (it did turn 
> up:http://groups.google.com/group/google-web-toolkit/browse_thread/threa...).
> It just isn't showing up in the search results for some reason.
>
> On Mar 11, 10:32 am, dougx <[email protected]> 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 [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.

Reply via email to