On 5/12/09 10:11 AM, Andy Schwartz wrote:
Hi David -

David Geary wrote On 5/12/2009 12:36 PM ET:

<h:selectOneMenu id="menu"
                  value="#{place.zoomIndex}"
                  valueChangeListener="#{place.zoomChanged}"
                  style="font-size:13px;font-family:Palatino">
    
  <f:selectItems value="#{places.zoomLevelItems}"/>
  <f:ajax execute="@this" render="image"/>
              
</h:selectOneMenu>

This looks good to me.

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:

form    form
j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:menu    3
javax.faces.ViewState    -1363564553004911965:-1863826268811277742
javax.faces.behavior.event    valueChange
javax.faces.partial.ajax    true
javax.faces.partial.event    change
javax.faces.partial.execute    j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:menu
javax.faces.partial.render    j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:image
javax.faces.source    j_id-939329235_16ef8569:0:j_id-939329235_16ef8513:j_id1608935764_5fe6690f:menu

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!)


I get a response back that looks like this:

  <?xml version="1.0" encoding="utf-8"?>
  <partial-response><changes><update id="javax.faces.ViewState"><![CDATA[1747337848471748955:2683565346534242854
  ]]></update></changes></partial-response>

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.

Does anyone know why my value change listener is not invoked? Am I doing something wrong, or is this a bug?

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.

It looks like the problem is with UIRepeat as it doesn't override visitTree() so when the post-back occurs, the component(s)
at index 0 aren't available as no iteration has occurred.

Hope to have this resolved tomorrow.