5 Replies Latest reply on Apr 20, 2007 2:36 PM by Sergey Smirnov

    a4j:outputPanel rerender only once

    Andriy Korud Newbie

      Hi,
      I have interesting problem - starting from second change of select list dataTable is not rerendered.
      Backing value bean is changed acording to selected item (ajax request is fired every time), but getXXX() is not called.
      Below is code and a4j debug log

      <h:form id="frm_main">
       <a4j:region renderRegionOnly="false">
       <t:selectOneMenu value="#{bNewUnitPage.newUnit.unitType}" id="newType" forceId="true">
       <f:selectItems value="#{bNewUnitPage.unitTypes}" />
       <a4j:support event="onchange" />
       </t:selectOneMenu>
       </a4j:region>
      
       <a4j:outputPanel ajaxRendered="true">
       <t:dataTable id="unitParams"
       value="#{bNewUnitPage.newUnitParams.params}" var="p">
       <t:column>
       <h:outputText value="#{p.label}" style="#{p.style}" />
       </t:column>
      
       <t:column>
       <h:outputText value="#{p.value}" rendered="#{p.readonly && !p.checkbox}" />
       <h:inputText value="#{p.value}" rendered="#{!p.readonly && !p.checkbox}" />
       </t:column>
       </t:dataTable>
       </a4j:outputPanel>
      
       <a4j:log popup="false" level="DEBUG"></a4j:log>
      </h:form>
      
      Start XmlHttpRequest
      debug[11:38:59,243]: Reqest state : 1
      debug[11:38:59,243]: QueryString: AJAXREQUEST=frm_main%3A_idJsp10&newType=1&newIdent=&
      frm_main%3AunitParams%3A0%3A_idJsp22=true&frm_main_SUBMIT=1
      &frm_main%3A_idcl=&frm_main%3A_link_hidden_=
      &javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmpl
      Y3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAEzcHQADC9uZXdVbml0Lmp
      zcA%3D%3D&frm_main%3A_idJsp12=frm_main%3A_idJsp12&
      debug[11:38:59,243]: Reqest state : 1
      debug[11:38:59,352]: Reqest state : 2
      debug[11:38:59,352]: Reqest state : 3
      debug[11:38:59,352]: Reqest state : 4
      debug[11:38:59,352]: Reqest end with state 4
      debug[11:38:59,352]: Response with content-type: text/xml;charset=UTF-8
      debug[11:38:59,352]: Full response content: <?xml version="1.0"?>
       <html xmlns="http://www.w3.org/1999/xhtml"><head>
      <base href="http://127.0.0.1:8080/gpec/" /><title></title>
      <script type="text/javascript" src="/gpec/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.jsf">
      </script><meta name="Ajax-Update-Ids" content=""
      /></head><body><span id="ajax-update-ids"><input type="hidden"
      name="jsf_sequence" value="4" /><input type="hidden"
      name="javax.faces.ViewState" id="javax.faces.ViewState" value="rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKW
      wCAAB4cAAAAAN0AAE0cHQADC9uZXdVbml0LmpzcA=="
      /></span><meta id="Ajax-Response" name="Ajax-Response"
      content="true" /> <meta http-equiv="pragma" content="no-cache" />
      <meta http-equiv="cache-control" content="no-cache" />
      <link rel="stylesheet" type="text/css" href="public/styles.css" />
       <link rel="stylesheet" type="text/css" href="public/basic.css" />
       <!-- MYFACES JAVASCRIPT --> </body></html>
      debug[11:38:59,352]: Header Ajax-Update-Ids not found, search in <meta>
      debug[11:38:59,352]: search for elements by name 'meta' in element #document
      debug[11:38:59,352]: getElementsByTagName found 4
      debug[11:38:59,352]: Find <meta name='Ajax-Update-Ids' content=''>
      warn[11:38:59,352]: No information in response about elements to replace
      debug[11:38:59,352]: call getElementById for id= ajax-update-ids
      debug[11:38:59,352]: Hidden JSF state fields: [object HTMLSpanElement]
      debug[11:38:59,352]: search for elements by name 'input' in element span
      debug[11:38:59,352]: getElementsByTagName found 2
      debug[11:38:59,352]: Replace value for inputs: 7 by new values: 2
      debug[11:38:59,352]: Input in response: jsf_sequence
      debug[11:38:59,352]: Input in response: javax.faces.ViewState
      debug[11:38:59,352]: Found same input on page with type: hidden
      debug[11:38:59,352]: search for elements by name 'INPUT' in element span
      debug[11:38:59,352]: getElementsByTagName found 0
      debug[11:38:59,352]: Replace value for inputs: 7 by new values: 0