0

Zul incorrectly rendered when IE8 targets an application in the intranet zone

asked 2012-02-14 16:46:12 +0800

cvarona gravatar image cvarona
554 1 6

Hi,

I'm developing an application on zk5.0.10 to be accessed from IE8 browsers. The application's address is configured as an intranet local site, and sites in the intranet are configured (this is necessary in order to guarantee legacy applications get displayed correctly) to be displayed in the compatibility mode.

I've tried to enforce the IE8 mode by applying a filter that establishes an X-UA-Compatible http header as IE=8. This way, when I load my zul page, I open the developer tools and see <body class="ie ie8" onbeforeunload="">; org.zkoss.zk.ui.util.Clients.evalJavaScript( "alert(document.documentMode);" ); also yields 8.

My zul does not get correctly rendered, however. Here's the difference:

It should be displayed like this:

Any suggestion?

delete flag offensive retag edit

12 Replies

Sort by » oldest newest

answered 2013-08-09 08:49:20 +0800

cvarona gravatar image cvarona
554 1 6

Hi,

I think you would need to detect the mode of the browser making the request at server side and generate the page accordingly. Whether this is actually possible or not, I'm afraid I cannot tell.

With kind regards

César Varona

link publish delete flag offensive edit

answered 2013-09-23 14:05:01 +0800

aznavour gravatar image aznavour
26 3

Hello everyone,

here is a hack, that nails down zk to a fixed browser version. Add a listener that implements WebAppInit with:

@Override
public void init(WebApp wapp) throws Exception {
    Servlets.setClientIdentifier(new ClientIdentifier() {

        @Override
        public ClientIdentifier matches(String userAgent) {
            return this;
        }

        @Override
        public double getVersion() {
            return 10;
        }

        @Override
        public String getName() {
            return "ie";
        }
    });
}

Best would be to detect the IE version in the client, send that information to the server and keep this in the session / wherever it makes sense. By default, ZK uses the http header string, which does not work correctly for the given case.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-02-14 16:46:12 +0800

Seen: 501 times

Last updated: Sep 23 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More