This is a common-place thing... I need to be able to detect the browser on the server-end and depending on what I see I send out different CSS URLs. So basically broken-assed explorer gets GIFs while FireFox gets translucent PNGs.


Thing is, I don't know of a good way to do this in Wicket. Here is my normal code:

<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
        @import url(common.css);
        @import url(not-ie.css);
        @import url(only-ie.css);
/*]]>*/-->
</style>

and as you can see, I want to selectively include or exclude not-ie.css and only-ie.css depending upon the browser user agent. Thing is, wicket expects HTML angled-bracket tags. That's nice and well but I can't go including this within a CSS <style> tag.

Ideally, what I am looking for is for Wicket to render the tag and in so doing remove the original tag. So for example:

        <div wicket:id="only-ie">

would get completely replaced with some body. No angle brackets are left around. Is there an easy way to do all this? Any suggestions?

Keep in mind I'm doing all this hacking because we don't have formal CSS support in Wicket. As such, I expect a half-decent workaround approach in 1.0 -- am I wrong here?

Gili


------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/info/Sentarus/hamr30 _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to