> 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]