Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 96689 invoked from network); 16 Jul 2007 21:46:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jul 2007 21:46:13 -0000 Received: (qmail 59019 invoked by uid 500); 16 Jul 2007 21:46:09 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 58989 invoked by uid 500); 16 Jul 2007 21:46:09 -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 58978 invoked by uid 99); 16 Jul 2007 21:46:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jul 2007 14:46:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of andrew.rw.robinson@gmail.com designates 209.85.132.249 as permitted sender) Received: from [209.85.132.249] (HELO an-out-0708.google.com) (209.85.132.249) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jul 2007 14:46:06 -0700 Received: by an-out-0708.google.com with SMTP id c3so326969ana for ; Mon, 16 Jul 2007 14:45:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hoeXXFZjkgm5vrGe6INtoioIfAiQpg+AZGsqTD3rQ4zCurx8MQzjJSUuxiDFLtDrMqrnRM6DeTz7E1D9HIwW4I9oHARbPUVYTHisofPXMdWHZdR/YKXxrWzvx7kqJF0MQgDzDeOBGsSXWdXiMBzntqZDwtjqTIa/oNH7E8WYaQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rTeIUeRqBKjqnz2IZKihQAKEImqIga0DCQu5W+bDwd3gcvcrmLlKtwFkKF5q6opT0odg4ngf5bUV/D7ks1rJbqOQqQyqEdMUzL4x5K6biRcKKEbZpfAIu6zDG0qsoRA2ke8uyEVLozLgPn5hhJlwZ4W8MN0x7Z3xCdbdOuUSR3c= Received: by 10.100.136.8 with SMTP id j8mr2556243and.1184622345569; Mon, 16 Jul 2007 14:45:45 -0700 (PDT) Received: by 10.100.191.4 with HTTP; Mon, 16 Jul 2007 14:45:45 -0700 (PDT) Message-ID: Date: Mon, 16 Jul 2007 15:45:45 -0600 From: "Andrew Robinson" To: "MyFaces Discussion" Subject: Re: h:commandButton/a4j:commandButton does Page Refresh ??? In-Reply-To: <11631547.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <11471154.post@talk.nabble.com> <11472288.post@talk.nabble.com> <11472824.post@talk.nabble.com> <11631547.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org I bet it is because your outputPanel is not rendered the first time. A4J needs to have a client HTML element present to replace the contents of. In your example, the "searchpanel" may not be rendered, and if so, there is nothing to replace on the client. A component that is reRendered must first be rendered. Try this instead: ... On 7/16/07, bansi wrote: > > Thanks Andrew i fixed it. I have similar kind of problem in different > situation > > Their is a Search Form . Click on Search button reRenders the h:dataTable to > display the search resultSet but this happens only after clicking the > Search button twice or thrice. Quite wierd > > I tried doing the same fix but it didnt work i.e. > > > reRender="searchpanel" ajaxSingle="true"/> > > > > rendered="#{searchDeviceBean.searchResultSet}"> > var="resultSet" styleClass="list" rowClasses="odd,even" > > > > > > > > Any pointers/suggestions will be highly appreciated > > > > > Andrew Robinson-5 wrote: > > > > Are you submitting values for those components? If so, the submitted > > value will be rendered, not the value from the back-end. > > > > Try this: > > > > > > > reRender="mypanel" ajaxSingle="true" /> > > > > > > > > ... > > > > > > What this will do is only decode/validate/update the inputText > > component. Then, the other components in the reRender will not have a > > submittedValue or a local value and thus will render the value from > > the backing bean instead of the value from the client. > > > > There was another thread recently talking about similar issues an how > > to clear submitted values and local values. I don't have the URL for > > that one though. > > > > Hope I understood you correctly, > > Andrew > > > > On 7/6/07, bansi wrote: > >> > >> Andrew, > >> Thanks for quick response. I will definately use the PhaseListener to > >> debug > >> the problem as you mentioned . Meanwhile i was thinking maybe i > >> misrepresented the problem . > >> Here is the situation > >> I have textfield with a4j onblur event > >> As i tab out it reRenders other fields on the form . But while > >> reRendering > >> dropdown fields, it picks one element after the other in that dropdown , > >> i > >> could see this on the page dropdown showing one element after the other. > >> And > >> then cursor goes in wait mode for a while. Finally i get the correct > >> results > >> > >> I understand the reason to this behaviour. As these dropdowns appear > >> later > >> in the page, JSF tries render them as part of rendering the page. But i > >> have > >> already rendered them using ajax onblur event. As i couldn't do much in > >> the > >> JSF page , So in the backing bean i am generating the dropdown only if > >> its > >> null. It still didnt help.I have posted the snippets in the post > >> http://www.nabble.com/Performance-issue-%3A-Setting-Dropdown-value-from-onblur-event-tf4037597.html. > >> > >> As i am sure i am making some small mistake somewhere like in this post, > >> i > >> would appreciate your time in taking a look at the code snippets in other > >> post > >> > >> > >> > >> Andrew Robinson-5 wrote: > >> > > >> > It is extremely hard to comment on that post, as performance issues > >> > can be anywhere in the code, especially since you are hitting the > >> > database. What I like to do, is create a debugging phase listener that > >> > prints out the current phase and then times the phase by adding the > >> > start time in the start of the phase into the request map and then > >> > performing a time difference in the end phase method. That way you can > >> > see what phase is slowing you down. > >> > > >> > Also, I have witnessed IE6 extremely slow to re-render SELECT boxes > >> > for some unknown reason. It may be because of the fact that IE6 uses > >> > an MFC control, but not sure. Your best bet is to use the above > >> > technique, a debugger and step through the code, an client side > >> > debugger (like firebug for firefox) to time the javascript or use a > >> > performance tool. > >> > > >> > On 7/6/07, bansi wrote: > >> >> > >> >> Thanks Andrew for the catch it works like charm now. I will appreciate > >> >> your > >> >> time in taking a look at my other post : > >> >> > >> http://www.nabble.com/Performance-issue-%3A-Setting-Dropdown-value-from-onblur-event-tf4037597.html. > >> >> > >> >> > >> >> > >> >> Andrew Robinson-5 wrote: > >> >> > > >> >> > Make sure you have the list boxes in the reRender property of the > >> a4j > >> >> > command button > >> >> > > >> >> > On 7/6/07, bansi wrote: > >> >> >> > >> >> >> I have observed a4j:commandButton works only on Page Refresh > >> >> >> > >> >> >> Here is the situation > >> >> >> > >> >> >> I am using two h:selectManyListbox to moves Roles i.e. All Roles to > >> >> >> selected > >> >> >> Roles using > >> >> >> > >> >> >> h:commandButton works perfectly fine , the only limitation is after > >> >> >> moving > >> >> >> the value from left to right Listbox, whole page is automatically > >> >> >> refreshed > >> >> >> & the cursor moves to the top of the page > >> >> >> > >> >> >> This is where we thought ajax4jsf would come in handy & started > >> using > >> >> >> a4j:commandButton instead of h:commandButton. > >> >> >> The result is when we click the a4j:commandButton it doesnt moves > >> the > >> >> >> value > >> >> >> from left to right Listbox. Then we did page refreshed then only > >> the > >> >> >> value > >> >> >> moved from left to right ListBox. Quite Amazing !!!. This is > >> totally > >> >> >> opposite to behaviour of ajax > >> >> >> > >> >> >> We want a4j:commandButton to move the values from left to right > >> >> ListBox > >> >> >> without page refresh . Any pointers/suggestions will be highly > >> >> >> appreciated > >> >> >> > >> >> >> > >> >> >> -- > >> >> >> View this message in context: > >> >> >> > >> >> > >> http://www.nabble.com/h%3AcommandButton-a4j%3AcommandButton-does-Page-Refresh-----tf4037659.html#a11471154 > >> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com. > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> http://www.nabble.com/h%3AcommandButton-a4j%3AcommandButton-does-Page-Refresh-----tf4037659.html#a11472288 > >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com. > >> >> > >> >> > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/h%3AcommandButton-a4j%3AcommandButton-does-Page-Refresh-----tf4037659.html#a11472824 > >> Sent from the MyFaces - Users mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: http://www.nabble.com/h%3AcommandButton-a4j%3AcommandButton-does-Page-Refresh-----tf4037659.html#a11631547 > Sent from the MyFaces - Users mailing list archive at Nabble.com. > >