Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CF78F65AE for ; Mon, 13 Jun 2011 21:34:32 +0000 (UTC) Received: (qmail 9120 invoked by uid 500); 13 Jun 2011 21:34:32 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 9087 invoked by uid 500); 13 Jun 2011 21:34:32 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 9079 invoked by uid 99); 13 Jun 2011 21:34:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2011 21:34:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of matt.faces@gmail.com designates 209.85.215.181 as permitted sender) Received: from [209.85.215.181] (HELO mail-ey0-f181.google.com) (209.85.215.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2011 21:34:27 +0000 Received: by eyh5 with SMTP id 5so1977276eyh.12 for ; Mon, 13 Jun 2011 14:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=pZwKyBGjpnDXOW+IyLysdewJpJC6vM/eVBUnYfdLQNM=; b=D8SaWYn7+GTgMUNwqD88J0HYK7doTTb4ipBBLRjXHLfN465Gpzp8CUDZKSDsJvhS0/ +AHVc6ulWd6ZhBsVUsV09Hjrk+D+KwiOBV9i8Svoy42lIMJ70BnbFkr924wDSV4VoFHD rGFFBVE+/Q0TP89ZZh6MH39YcLHbvPy4vNeVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=PCZ6BIIj/fO6MBQwuw731/KPITPYX1a+Td1A5QcTl2wbECFfuApR60InXPdN8YlHOJ Rs2NSHwgwfwljI1B4m6513i2t1J74T7NfTG5yyFhOStSFcQ2va49QK3BiF3B06YHa4Hm o+kQi6bPQVnS/xgbPbE8FrNa1Mj+FWus9OoaI= MIME-Version: 1.0 Received: by 10.14.9.97 with SMTP id 73mr2441395ees.29.1308000845487; Mon, 13 Jun 2011 14:34:05 -0700 (PDT) Sender: matt.faces@gmail.com Received: by 10.14.22.70 with HTTP; Mon, 13 Jun 2011 14:34:05 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jun 2011 15:34:05 -0600 X-Google-Sender-Auth: GNwao9Z8X2WqnW-_np2z9BziToA Message-ID: Subject: Re: ViewExpiredException only in some IE8 From: Matt Cooper To: MyFaces Discussion Content-Type: multipart/alternative; boundary=0016364c7584c2de4c04a59eadf4 --0016364c7584c2de4c04a59eadf4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I believe that if you are seeing a different browser mode for "localhost" vs. "machinename" then this is either coming from the IE compatibility view preferences where the user has chosen to run pages from a given domain in compatibility view or the domain is listed in one of Microsoft's xml files like http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml where it will (by default) try to choose some other document mode for that domain. Unfortunately, there is no way to force IE version X to also use Browser Mode X for your web application. You can't even know what version "X" is because the user agent header that IE sends to the server changes based on what Browser Mode is active. However, it is possible to force IE to use a Document Mode that matches the currently-assigned Browser Mode if the following were in the DocumentRenderer: // Force IE to use matching "browser mode" (Agent version) and "document mode" (doctype). // IE requires this be the FIRST element in the HEAD tag. Agent agent =3D rc.getAgent(); if (agent.getAgentName().equals(Agent.AGENT_IE)) { String agentVersion =3D agent.getAgentVersion(); float ieVersion; try { ieVersion =3D Float.parseFloat(agentVersion); } catch (NumberFormatException e) { ieVersion =3D 7.0f; } out.startElement("meta", null); out.writeAttribute("http-equiv" , "X-UA-Compatible", null); out.writeAttribute("content" , "IE=3D" + ieVersion, null); out.endElement("meta"); } This meta tag might help prevent some of the mismatching mode behaviors; it is funny how "compatibility view" makes things incompatible :) Too bad there isn't a "just use the real behavior for the version of the browser that is installed" mode, maybe if enough people asked for it, Microsoft might add such a switch; e.g.: - force IE10 to use Document Mode 10 and Browser Mode 10 - force IE9 to use Document Mode 9 and Browser Mode 9 - force IE8 to use Document Mode 8 and Browser Mode 8 An extra level of protection could be when running Internet Explorer, take the ieVersion number as seen above and somehow send it to the browser and then in JavaScript: - if ieVersion is a number less than 8, and - if the variable "document.documentMode" is not equal to null then you are running in compatibility view mode. When this is detected, yo= u could then show an alert to the user, asking them to disable compatibility view. Perhaps the above meta tag is sufficient on its own--it is worth testing. Note that it looks like Microsoft does have a process to get your domain removed from their compatibility view xml files: http://msdn.microsoft.com/en-us/library/dd567845(v=3Dvs.85).aspx Regards, Matt On Mon, Jun 13, 2011 at 2:52 PM, C=E9dric Durmont wrot= e: > Try changing the "compatibility mode" in IE. IE8 "almost always" > switches to IE7-compatible mode with Trinidad. > Also, you may get different result if you access your Trinidad app > with "http://machinename/..." and "http://localhost/...". As strange > as it sounds, IE has a different behavior when you use "localhost" > (and this has nothing to do with security parameters... Man I love > this browser !) > > Regards, > Cedric > > 2011/6/10 Walter Mour=E3o : > > Hi Cedric, > > just tried with tr:setActionListener and I've got the same result... th= is > is > > really a strange problem: IE8 (same 'complete' version) accessing the > same > > site, same configuration, etc. Works with one and doesn't work with the > > other. Continuing the quest... > > > > Walter Mour=E3o > > http://waltermourao.com.br > > http://arcadian.com.br > > http://oriens.com.br > > > > > > > > On Fri, Jun 10, 2011 at 10:02 AM, C=E9dric Durmont > wrote: > > > >> Hi Walter, > >> > >> The only thing that looks unusual to me in your code is the mix > >> between tr:commandLink and f:setPropertyActionListener. Have you tried > >> tr:setActionListener instead ? > >> (btw I see no reason why this would cause a viewExpiredException on > >> some browsers, but who said computing was an exact science ?) > >> > >> Regards, > >> Cedric > >> > >> 2011/6/10 Walter Mour=E3o : > >> > Hi folks, > >> > I'm using Myfaces 1.2.9, Trinidad 1.2.14. > >> > the following commandLink (and others in the same application) cause= s > >> > ViewExpiredException in some (!!!) IE8... > >> > > >> > >> > > action=3D"#{listarRelatoriosController.visualizandoRelatorioMudarPagina}" > >> > > >> > disabled=3D"#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.pagina= Atual > >> > ge form.paginas}" partialSubmit=3D"false"> > >> > >> > shortDesc=3D"#{messages['proxima.pagina']}" > inlineStyle=3D"border-style:none" > >> /> > >> > >> > > value=3D"#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAtu= al > >> + > >> > 1}" > >> > > >> > target=3D"#{listarRelatoriosVisualizandoRelatorioMudarPaginaForm.paginaAt= ual}" > >> > /> > >> > > >> > > >> > I'm lost... Hints ? > >> > > >> > Walter Mour=E3o > >> > http://waltermourao.com.br > >> > http://arcadian.com.br > >> > http://oriens.com.br > >> > > >> > > > --0016364c7584c2de4c04a59eadf4--