4 Replies Latest reply on Jan 15, 2009 6:19 AM by Damian Harvey

    ReRender problem with Richfaces 3.2.2.SR1

    Damian Harvey Master

      I have a a4j:region on a page and inside that an inputfield and a button. When the button is clicked the panel surrounding the region should reRender.

      This works under Richfaces 3.2.0.GA and under Richfaces 3.3.0.GA. However under 3.2.2.SR1 the method finishes but the page is never updated.

      I can't find any mention in the JIRA of this being fixed (but it is). The obvious solution is to upgrade my application to 3.3 however it would be nice to know what the story is with this as it's fairly major (at least to me). Is this a known issue with 3.2.2? Is it unique to me?

      <h:form>
       <a:outputPanel id="bookingDetails">
       <s:div rendered="#{testBean.booking eq null}">
       <a:region>
       <s:decorate id="bookingNumDeco" template="/layout/edit_inline.xhtml" style="display:inline;" >
       <ui:define name="label">#{messages['enterBooking.bookingNum']}</ui:define>
       <h:inputText styleClass="inputField" id="bookingNum" value="#{testBean.bookingNum}" size="10"/>
       </s:decorate>
      
       <a:commandButton
       id="findBookingButton"
       styleClass="button"
       status="findBookingStatus"
       value="#{messages['enterShippingInstruction.findBooking']}"
       action="#{testBean.findBookingByNumber()}"
       reRender="bookingDetails">
       <s:defaultAction/>
       </a:commandButton>
       <ui:include src="/WEB-INF/include/AjaxStatus.xhtml"><ui:param name="statusId" value="findBookingStatus"/></ui:include>
      
       </a:region>
       </s:div>
       <s:fragment rendered="#{testBean.booking ne null}">
       <h:outputText value="Test successful. Booking is #{testBean.booking.bookingNum}"/>
       </s:fragment>
       </a:outputPanel>
      </h:form>
      


      Thanks,

      Damian.

        • 1. Re: ReRender problem with Richfaces 3.2.2.SR1
          Ilya Shaikovsky Master

          please check the a4j:log.. there should be errors on reRendering.

          • 2. Re: ReRender problem with Richfaces 3.2.2.SR1
            Damian Harvey Master

            Thanks Ilya.

            The log says nothing other than that there is no content to replace. Note that all I have done between the logs below is swapping out the richfaces jars and redeploying.

            Here's the a4j:log under 3.2.2.SR1:

            Clear
            debug[14:18:24,760]: Have Event [object Object] with properties: target: [object HTMLInputElement], srcElement: undefined, type: click
            debug[14:18:24,760]: NEW AJAX REQUEST !!! with form :j_id199
            debug[14:18:24,761]: Append hidden control j_id199 with value [j_id199] and value attribute [j_id199]
            debug[14:18:24,762]: Append text control j_id199:bookingNumDeco:bookingNum with value [14527] and value attribute [null]
            debug[14:18:24,763]: Append hidden control javax.faces.ViewState with value [j_id4] and value attribute [j_id4]
            debug[14:18:24,763]: parameter j_id199:findBookingButton with value j_id199:findBookingButton
            debug[14:18:24,764]: Start XmlHttpRequest
            debug[14:18:24,765]: Reqest state : 1
            debug[14:18:24,766]: QueryString: AJAXREQUEST=j_id199%3Aj_id201&
            j_id199=j_id199&j_id199%3AbookingNumDeco%3AbookingNum=14527&
            javax.faces.ViewState=j_id4&
            j_id199%3AfindBookingButton=j_id199%3AfindBookingButton&
            debug[14:18:24,772]: Reqest state : 1
            debug[14:18:24,905]: Reqest state : 2
            debug[14:18:24,906]: Reqest state : 4
            debug[14:18:24,906]: Reqest end with state 4
            debug[14:18:24,906]: Response with content-type: text/html;charset=UTF-8
            debug[14:18:24,907]: Full response content:
            debug[14:18:24,909]: Header Ajax-Response not found, search in <meta>
            debug[14:18:24,909]: Header Ajax-Expired not found, search in <meta>
            warn[14:18:24,909]: No ajax response header
            debug[14:18:24,909]: Header Location not found, search in <meta>
            warn[14:18:24,910]: No content in response for replace current page
            


            And here's the a4j:log under 3.3.0.GA (same for 3.2.0.GA):
            Clear
            debug[14:12:42,181]: Have Event [object Object] with properties: target: [object HTMLInputElement], srcElement: undefined, type: click
            debug[14:12:42,182]: Query preparation for form 'j_id199' requested
            debug[14:12:42,183]: Append hidden control j_id199 with value [j_id199] and value attribute [j_id199]
            debug[14:12:42,183]: Append text control j_id199:bookingNumDeco:bookingNum with value [14527] and value attribute [null]
            debug[14:12:42,184]: Append hidden control javax.faces.ViewState with value [j_id30] and value attribute [j_id30]
            debug[14:12:42,184]: parameter j_id199:findBookingButton with value j_id199:findBookingButton
            debug[14:12:42,184]: Look up queue with default name
            debug[14:12:42,185]: NEW AJAX REQUEST !!! with form: j_id199
            debug[14:12:42,186]: Start XmlHttpRequest
            debug[14:12:42,187]: Reqest state : 1
            debug[14:12:42,188]: QueryString: AJAXREQUEST=j_id199%3Aj_id201&
            j_id199=j_id199&j_id199%3AbookingNumDeco%3AbookingNum=14527&
            javax.faces.ViewState=j_id30&
            j_id199%3AfindBookingButton=j_id199%3AfindBookingButton&
            debug[14:12:42,193]: Reqest state : 1
            debug[14:12:42,306]: Reqest state : 2
            debug[14:12:42,308]: Reqest state : 3
            debug[14:12:42,309]: Reqest state : 3
            debug[14:12:42,310]: Reqest state : 4
            debug[14:12:42,310]: Reqest end with state 4
            debug[14:12:42,311]: Response with content-type: text/xml;charset=UTF-8
            debug[14:12:42,311]: Full response content: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><link
            class="component" href="/Odyssey/a4j/s/3_3_0.GAorg/richfaces/renderkit
            /html/css/basic_classes.xcss/DATB/eAELXT5DOhSIAQ!sA18_"
            rel="stylesheet" type="text/css" /><link class="component" href="/Odyssey
            /a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/extended_classes.xcss
            /DATB/eAELXT5DOhSIAQ!sA18_" media="rich-extended-skinning"
            rel="stylesheet" type="text/css" /><link class="component" href="/Odyssey
            /a4j/s/3_3_0.GAcss/toolBar.xcss/DATB/eAELXT5DOhSIAQ!sA18_"
            rel="stylesheet" type="text/css" /><script src="/Odyssey/a4j/g
            /3_3_0.GAorg.ajax4jsf.javascript.PrototypeScript" type="text/javascript">
            </script><script src="/Odyssey/a4j/g
            /3_3_0.GAorg.ajax4jsf.javascript.AjaxScript" type="text/javascript">
            </script><script src="/Odyssey/a4j/g/3_3_0.GAscripts/menu.js"
            type="text/javascript"> </script><link class="component" href="/Odyssey
            /a4j/s/3_3_0.GAcss/dropdownmenu.xcss/DATB/eAELXT5DOhSIAQ!sA18_"
            rel="stylesheet" type="text/css" /><script src="/Odyssey/a4j/g
            /3_3_0.GAorg/richfaces/renderkit/html/scripts/utils.js"
            type="text/javascript"> </script><script src="/Odyssey/a4j/g/3_3_0.GAorg
            /ajax4jsf/javascript/scripts/form.js" type="text/javascript"> </script>
            <script src="/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts
            /form.js" type="text/javascript"> </script><link class="component"
            href="/Odyssey/a4j/s/3_3_0.GAcss/menucomponents.xcss
            /DATB/eAELXT5DOhSIAQ!sA18_" rel="stylesheet" type="text/css" /><script
            src="/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/jquery
            /jquery.js" type="text/javascript"> </script><script src="/Odyssey/a4j/g
            /3_3_0.GAorg/richfaces/renderkit/html/scripts/tooltip.js"
            type="text/javascript"> </script><link class="component" href="/Odyssey
            /a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/tooltip.xcss
            /DATB/eAELXT5DOhSIAQ!sA18_" rel="stylesheet" type="text/css" /><script
            src="/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts
            /browser_info.js" type="text/javascript"> </script><script src="/Odyssey
            /a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/modalPanel.js"
            type="text/javascript"> </script><script src="/Odyssey/a4j/g/3_3_0.GAorg
            /richfaces/renderkit/html/scripts/modalPanelBorders.js"
            type="text/javascript"> </script><link class="component" href="/Odyssey
            /a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/modalPanel.xcss
            /DATB/eAELXT5DOhSIAQ!sA18_" rel="stylesheet" type="text/css" /><script
            src="/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts
            /skinning.js" type="text/javascript"> </script></head><body><span
            id="j_id199:bookingDetails">Test successful. Booking is
            14527</span><meta name="Ajax-Update-Ids"
            content="j_id199:bookingDetails" /><span id="ajax-view-state"><input
            type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState"
            value="j_id30" /></span><meta id="Ajax-Response" name="Ajax-
            Response" content="true" /></body></html>
            debug[14:12:42,313]: Header Ajax-Expired not found, search in <meta>
            debug[14:12:42,313]: search for elements by name 'meta' in element #document
            debug[14:12:42,321]: Find <meta name='Ajax-Update-Ids' content='j_id199:bookingDetails'>
            debug[14:12:42,322]: Find <meta name='Ajax-Response' content='true'>
            debug[14:12:42,322]: Header Ajax-Update-Ids not found, search in <meta>
            debug[14:12:42,322]: search for elements by name 'meta' in element #document
            debug[14:12:42,328]: Find <meta name='Ajax-Update-Ids' content='j_id199:bookingDetails'>
            debug[14:12:42,329]: Update page by list of rendered areas from response j_id199:bookingDetails
            debug[14:12:42,329]: search for elements by name 'script' in element #document
            debug[14:12:42,337]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.PrototypeScript
            debug[14:12:42,338]: Such element exist in document
            debug[14:12:42,338]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.AjaxScript
            debug[14:12:42,338]: Such element exist in document
            debug[14:12:42,338]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAscripts/menu.js
            debug[14:12:42,339]: Such element exist in document
            debug[14:12:42,339]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/utils.js
            debug[14:12:42,339]: Such element exist in document
            debug[14:12:42,339]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/ajax4jsf/javascript/scripts/form.js
            debug[14:12:42,340]: Such element exist in document
            debug[14:12:42,340]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/form.js
            debug[14:12:42,340]: Such element exist in document
            debug[14:12:42,341]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/jquery/jquery.js
            debug[14:12:42,341]: Such element exist in document
            debug[14:12:42,341]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/tooltip.js
            debug[14:12:42,341]: Such element exist in document
            debug[14:12:42,342]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/browser_info.js
            debug[14:12:42,342]: Such element exist in document
            debug[14:12:42,342]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/modalPanel.js
            debug[14:12:42,343]: Such element exist in document
            debug[14:12:42,343]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/modalPanelBorders.js
            debug[14:12:42,343]: Such element exist in document
            debug[14:12:42,344]: <script> in response with src=/Odyssey/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/skinning.js
            debug[14:12:42,344]: Such element exist in document
            debug[14:12:42,344]: search for elements by name 'link' in element #document
            debug[14:12:42,353]: <link> in response with src=/Odyssey/a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAELXT5DOhSIAQ!sA18_
            debug[14:12:42,353]: Such element exist in document
            debug[14:12:42,354]: <link> in response with src=/Odyssey/a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAELXT5DOhSIAQ!sA18_
            debug[14:12:42,354]: Such element exist in document
            debug[14:12:42,354]: <link> in response with src=/Odyssey/a4j/s/3_3_0.GAcss/toolBar.xcss/DATB/eAELXT5DOhSIAQ!sA18_
            debug[14:12:42,354]: Such element exist in document
            debug[14:12:42,355]: <link> in response with src=/Odyssey/a4j/s/3_3_0.GAcss/dropdownmenu.xcss/DATB/eAELXT5DOhSIAQ!sA18_
            debug[14:12:42,355]: Such element exist in document
            debug[14:12:42,355]: <link> in response with src=/Odyssey/a4j/s/3_3_0.GAcss/menucomponents.xcss/DATB/eAELXT5DOhSIAQ!sA18_
            debug[14:12:42,355]: Such element exist in document
            debug[14:12:42,356]: <link> in response with src=/Odyssey/a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/tooltip.xcss/DATB/eAELXT5DOhSIAQ!sA18_
            debug[14:12:42,356]: Such element exist in document
            debug[14:12:42,356]: <link> in response with src=/Odyssey/a4j/s/3_3_0.GAorg/richfaces/renderkit/html/css/modalPanel.xcss/DATB/eAELXT5DOhSIAQ!sA18_
            debug[14:12:42,357]: Such element exist in document
            debug[14:12:42,357]: call getElementById for id= org.ajax4jsf.queue_script
            debug[14:12:42,357]: Update page part from call parameter for ID j_id199:bookingDetails
            debug[14:12:42,357]: call getElementById for id= j_id199:bookingDetails
            debug[14:12:42,360]: Replace content of node by replaceChild()
            debug[14:12:42,361]: search for elements by name 'script' in element span
            debug[14:12:42,370]: Scripts in updated part count : 0
            debug[14:12:42,371]: call getElementById for id= org.ajax4jsf.oncomplete
            debug[14:12:42,371]: Processing updates finished, no oncomplete function to call
            debug[14:12:42,371]: Update part of page for Id: j_id199:bookingDetails successful
            debug[14:12:42,372]: call getElementById for id= ajax-view-state
            debug[14:12:42,372]: Hidden JSF state fields: [object HTMLSpanElement]
            debug[14:12:42,372]: Namespace for hidden view-state input fields is undefined
            debug[14:12:42,372]: search for elements by name 'input' in element span
            debug[14:12:42,377]: Replace value for inputs: 5 by new values: 1
            debug[14:12:42,378]: Input in response: javax.faces.ViewState
            debug[14:12:42,378]: Found same input on page with type: hidden
            debug[14:12:42,378]: Found same input on page with type: hidden
            debug[14:12:42,379]: search for elements by name 'INPUT' in element span
            debug[14:12:42,383]: Replace value for inputs: 5 by new values: 0
            debug[14:12:42,384]: call getElementById for id= _A4J.AJAX.focus
            debug[14:12:42,384]: No focus information in response
            

            Thanks,

            Damian.

            • 4. Re: ReRender problem with Richfaces 3.2.2.SR1
              Damian Harvey Master

              Ok thanks Nick.

              Cheers,

              Damian.