Re: How do others include their browser specific styles in Wicket?
Hi, We get the client info the same way, but how do you prevent having to manually do (for example): page.add(HeaderContributor.forCss(_css/style.css, screen)); if (clientProperties.isBrowserInternetExplorer()) { page.add(HeaderContributor.forCss(_css/screen_ie.css, screen)); } // possibly even: else if isBrowserXXX, etc. ...in the XXXBasePage for each and every project. Not that this is very hard or cumbersome to do so. I just want to know what is the wicket way (tm)? @Nino: How do you cope with differences in css interprations between browsers? Css hacks? Regards, Sjoerd -- Sjoerd Lohuis Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 Johan Compagner wrote: Session.getClientInfo() ? On 11/6/07, Sjoerd Lohuis [EMAIL PROTECTED] wrote: There are a few ways to include your browser specific styles in a project: - CSS hacks to target specific browsers - IE Conditional Comments - Server-side browsercheck I'm not asking which way is better or the best. I'm asking who's using one of these methods and what is the best way to implement this in Wicket. The way I'm currently doing it is by using a server-side browsercheck which includes the necessary stylesheets in my pages. This is done by a Java Class which we reuse in evrey new project. Is there maybe a standard Wicket browsercheck component for this? -- Sjoerd Lohuis Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do others include their browser specific styles in Wicket?
Hi, We get the client info the same way, but how do you prevent having to manually do (for example): page.add(HeaderContributor.forCss(_css/style.css, screen)); if (clientProperties.isBrowserInternetExplorer()) { page.add(HeaderContributor.forCss(_css/screen_ie.css, screen)); } // possibly even: else if isBrowserXXX, etc. ...in the XXXBasePage for each and every project. Not that this is very hard or cumbersome to do so. I just want to know what is the wicket way (tm)? You should be able to use Session's style property for that. The contribution that is added through calling add(HeaderContributor.forCss(foo.css)) should use that when rendering: protected Resource newResource() { PackageResource packageResource = CompressedPackageResource.get(getScope(), getName(), getLocale(), getStyle()); ... Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do others include their browser specific styles in Wicket?
On Nov 11, 2007 2:24 AM, Johan Compagner [EMAIL PROTECTED] wrote: Session.getClientInfo() ? See also the HelloBrowser example (http://wicketstuff.org/wicket13/hellobrowser/). Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do others include their browser specific styles in Wicket?
We dont, we have one css for them all. Thats. IE 6,7 FF 1.5,2 Safari for us. regards Nino Sjoerd Lohuis wrote: There are a few ways to include your browser specific styles in a project: - CSS hacks to target specific browsers - IE Conditional Comments - Server-side browsercheck I'm not asking which way is better or the best. I'm asking who's using one of these methods and what is the best way to implement this in Wicket. The way I'm currently doing it is by using a server-side browsercheck which includes the necessary stylesheets in my pages. This is done by a Java Class which we reuse in evrey new project. Is there maybe a standard Wicket browsercheck component for this? -- Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do others include their browser specific styles in Wicket?
Session.getClientInfo() ? On 11/6/07, Sjoerd Lohuis [EMAIL PROTECTED] wrote: There are a few ways to include your browser specific styles in a project: - CSS hacks to target specific browsers - IE Conditional Comments - Server-side browsercheck I'm not asking which way is better or the best. I'm asking who's using one of these methods and what is the best way to implement this in Wicket. The way I'm currently doing it is by using a server-side browsercheck which includes the necessary stylesheets in my pages. This is done by a Java Class which we reuse in evrey new project. Is there maybe a standard Wicket browsercheck component for this? -- Sjoerd Lohuis Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]