Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 24380 invoked from network); 6 Nov 2007 09:13:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 09:13:02 -0000 Received: (qmail 25259 invoked by uid 500); 6 Nov 2007 09:12:36 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 25198 invoked by uid 500); 6 Nov 2007 09:12:36 -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 24536 invoked by uid 99); 6 Nov 2007 09:12:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 01:12:34 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.46.255.22] (HELO viefep18-int.chello.at) (213.46.255.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 09:13:04 +0000 Received: from viefep18 ([192.168.13.147]) by viefep18-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071106091214.RIAN21658.viefep18-int.chello.at@viefep18>; Tue, 6 Nov 2007 10:12:14 +0100 Message-ID: <28034119.1194340334772.JavaMail.root@viefep18> Date: Tue, 6 Nov 2007 10:12:14 +0100 From: Simon Kitching To: MyFaces Discussion Subject: Re: browser page refresh (F5) displays wrong values quite often Cc: mario_nabble MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) Sensitivity: Normal X-Originating-IP: from 62.116.38.218 by web-edge.chello.com; Tue, 6 Nov 2007 10:12:14 +0100 X-Virus-Checked: Checked by ClamAV on apache.org Hi Mario, Have you tried using "shift-f5"? Some browsers implement refresh internally, ie redisplay the contents of their cache rather than sending a request back to the server. I suspect that is what is happening to you: the browser is trying to be smart and serving its cached data to you for an internally-hardwired number of refreshes (8 in this case), then deciding you *really* want to refresh and fetching from the server. I think shift-f5 traditionally forces a reload from the remote server rather than serving from the cache. If this is the case, then you might want to look at what http headers you are sending with your pages. There are headers available that order browsers to not use page caching etc. If you are not using Firefox, then I can highly recommend using it and installing the "live http headers" extension so that you can see exactly what requests/responses are being exchanged. Regards, Simon ---- mario_nabble schrieb: > > Hi all, > > This one really puzzles me. I have a page with a backing bean and 2 text > input fields: a string and a float. Ajax4Jsf is sending down the changes, > which happen all fine. Now, if I press F5 (refresh) for a few times, the > displayed values will cycle between the old and the newly set values. > Sometimes they are OK, sometimes old, the cycle repeats each 8 clicks on the > refresh and the two values are not wrong at the same time (aka sometimes > only one, sometimes both, but still repeatable). > > I don't even know where to start... > > I just notice in the console that the getters for the properties are not > always called - are missing precisely when the value is wrong. Below also a > console snippet. > > I use MyFaces 1.2.0, Tomahawk 1.1.6, Facelets 1.0.14, Richfaces 3.1.0, > Eclipse 3.3 and Tomcat 5.5.whatever. > Here is the code, I left out the headers and such: > > index.xhtml > > > id="tarifZone" > columns="1" > border="0" > cellspacing="0" > cellpadding="0"> > > > > > > > myGroup.xhtml > > > cellpadding="10"> > > > > > > > > title="#{DataAccess.blah}"> > reRender="myGroup" /> > > > > value="#{DataAccess.test}" > title="testfloat" > id="testfloat"> > reRender="myGroup" /> > > > > > > > > > DataAccess.java: > > public class DataAccess { > > private String blah = "1"; > private Float test = 1.0F; > public String getBlah() { > System.out.println("---get blah: " + blah); > return blah; > } > public void setBlah(String val) { > System.out.println("---set blah: " + val); > this.blah = val; > } > public Float getTest() { > System.out.println("---get test: " + test); > return test; > } > public void setTest(Float val) { > System.out.println("---set test: " + val); > test=val; > } > } > > and console output, with a correct and a wrong refresh: > > 05 Nov 2007 17:49:30,129 DEBUG javax.faces.webapp.FacesServlet - service > begin > BeforePhase: RESTORE_VIEW(1) > AfterPhase: RESTORE_VIEW(1) > BeforePhase: RENDER_RESPONSE(6) > ---get blah: 1111 > ---get blah: 1111 <------------------------no getter for "test", wrong value > displayed!!!!!!!!!! > AfterPhase: RENDER_RESPONSE(6) > 05 Nov 2007 17:49:30,144 DEBUG javax.faces.webapp.FacesServlet - service end > 05 Nov 2007 17:49:39,036 DEBUG javax.faces.webapp.FacesServlet - service > begin > BeforePhase: RESTORE_VIEW(1) > AfterPhase: RESTORE_VIEW(1) > BeforePhase: RENDER_RESPONSE(6) > ---get blah: 1111 > ---get blah: 1111 > ---get test: 2222.0 <------------------- getter called, correct value > displayed > AfterPhase: RENDER_RESPONSE(6) > 05 Nov 2007 17:49:39,052 DEBUG javax.faces.webapp.FacesServlet - service end > > > Thank you very very very much for hinting me what I'm doing wrong... > Regards, > M > > -- > View this message in context: http://www.nabble.com/browser-page-refresh-%28F5%29-displays-wrong-values-quite-often-tf4753007.html#a13591145 > Sent from the MyFaces - Users mailing list archive at Nabble.com. >