<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 5/12/09 2:17 PM, David Geary wrote:
<blockquote
cite="mid:75fa9e650905121417h7e0b4758obbd3de65a428c03f@mail.gmail.com"
type="cite">2009/5/12 Andy Schwartz <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:andy.schwartz@oracle.com">andy.schwartz@oracle.com</a>></span>
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Hi David -</div>
</blockquote>
<div><br>
Hi Andy,<br>
<br>
Thanks for responding.<br>
<br>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">David Geary wrote On
5/12/2009 12:36 PM ET:
<div class="im">
<blockquote type="cite"><h:selectOneMenu id="menu"<br>
value="#{place.zoomIndex}"<br>
valueChangeListener="#{place.zoomChanged}"<br>
style="font-size:13px;font-family:Palatino"><br>
<br>
<f:selectItems value="#{places.zoomLevelItems}"/><br>
<b><f:ajax execute="@this" render="image"/><br>
</b> <br>
</h:selectOneMenu><br>
</blockquote>
<br>
</div>
This looks good to me.</div>
</blockquote>
<div class="im"><br>
Yup. I thought that perhaps I was failing validation for some reason,
so I added immediate="true" to the f:ajax tag, but it didn't fix the
problem. :(<br>
<br>
<blockquote type="cite">With FireBug, I've verified that a POST
request is indeed executed when
I change the zoom level, and it appears that everything is in order:<br>
<br>
form form<br>
j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:menu
3<br>
javax.faces.ViewState -1363564553004911965:-1863826268811277742<br>
javax.faces.behavior.event valueChange<br>
javax.faces.partial.ajax true<br>
javax.faces.partial.event change<br>
javax.faces.partial.execute
j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:menu<br>
javax.faces.partial.render
j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:image<br>
javax.faces.source
j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:menu<br>
</blockquote>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">And the request payload looks
right - seems like all of the necessary
information is present. (Though, man, those auto-generated client ids
sure are huge!)</div>
</blockquote>
<div class="im"><br>
Yes, it looks right to me too.<br>
<blockquote type="cite">I get a response back that looks like this:<br>
<br>
<?xml version="1.0" encoding="utf-8"?><br>
<partial-response><changes><update
id="javax.faces.ViewState"><![CDATA[1747337848471748955:2683565346534242854<br>
]]></update></changes></partial-response><br>
<br>
However, with f:ajax, my value change listener is never invoked on the
server, so the menu doesn't update, even though I've specified that the
menu should go through the execute phase of the lifecycle. <br>
<br>
Does anyone know why my value change listener is not invoked? Am I
doing something wrong, or is this a bug?<br>
</blockquote>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Seems like the execute
portion of the lifecycle is not being invoked
properly. I don't see anything wrong in your code - so I suspect there
is a bug here.</div>
</blockquote>
<div class="im"><br>
I put a phase listener in the app to monitor the lifecycle, and all six
phases of the lifecycle are invoked, in the correct order when the ajax
request is made, but my value change listener is still not invoked.
It's interesting to note that when I remove the f:ajax tag, and add an
onchange="submit()" attribute to the menu, my value change listener
does get invoked, so it definitely seems like a bug to me. I can't
think of any good reason for the difference in behavior between the
Ajax and non-Ajax versions.<br>
<br>
It seems to me that the lifecycle is executing properly, but it's not
processing my menu, even though I've got execute="@this", and that
information is apparently correctly passed to the server.<br>
<br>
Is anyone from the RI team listening? Ryan? I can JAR up the app, and
send it to interested parties. I'd really like to get this fixed so I
can nail down this demo for JavaOne. It's a pretty cool demo, but it
looses much of its appeal when it doesn't work.<br>
</div>
</div>
</blockquote>
Feel free to send it my way.<br>
<blockquote
cite="mid:75fa9e650905121417h7e0b4758obbd3de65a428c03f@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div class="im"><br>
Help!!<br>
<blockquote type="cite"><br>
btw, here are a couple of interesting datapoints:<br>
<br>
1. I have breakpoints in jsf.ajax.request and jsf.ajax.response. The
request breakpoint is hit, but the response is not. The return status
for the response is 200, so there are apparently no errors.<br>
<br>
2. I thought, from Jim Driscoll's blog about f:ajax, that we had to
specify client ids for execute and render, so I originally had this:<br>
<br>
<f:ajax execute="@this" render="#{cc.clientId}:image"/><br>
<br>
But when I do that, I get this error...<br>
<br>
<f:ajax> contains an unknown id
'j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:image'<br>
<br>
..when I load the page, even though that is the correct client id (as
evidenced from the request data above). Evidently, we're supposed to
use the component id and not the client id?<br>
</blockquote>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">When specifying
execute/render ids for <f:ajax>, the id
resolution behavior is similar to findComponent(). So, if you specify
a relative id, eg. "image", this should be resolved relative to the
nearest naming container. In your case, that would be the composite
component. In order to specify an absolute id, you would prefix the id
with ":", eg. ":foo:mycompositecomp:image".</div>
</blockquote>
<div><br>
Ah, okay, I missed that in the docs. Thanks for the explanation.<br>
<br>
<br>
david</div>
</div>
</blockquote>
<br>
</body>
</html>