2 Replies Latest reply on Jul 26, 2010 4:33 PM by Well Nery

    Ajax response without the structure of XHTML

    Well Nery Newbie

      Hi,

       

      My page have the following code:

       

      ...........

      <a4j:region id="region" renderRegionOnly="true" >

                          <a4j:poll reRender="colum" action="#{bean.test}" interval="1000"/>

       

      <rich:dataTable value="#{bean.list}"
                                          var="list"
                                          id="dataTable"
                                          rows="10"
                                          ajaxKeys="#{bean.keyToUpdate}">
                              <rich:column id="colum">
                                  <f:facet name="header">
                                      <h:outputText value="Name" /> 
                                  </f:facet>
                                  <h:outputText id="name" value="#{list.name}" />
                              </rich:column>

           ............

       

      The code snippet above do update only the row I want through ajaxKeys. But looking at wireshark(http://www.wireshark.org/) the app receive all XHTML's structure from ajax request! In other words, it send 1150 bytes (depending of update's information) of 1500 total bytes of an IP packet.

      Can I send only the information (without XHTML structure) and uptade the dataTable's row?? And if I can't, I wanted to understand why.

       

      Thank's in advance!!

        • 1. Re: Ajax response without the structure of XHTML
          Ilya Shaikovsky Master

          define name in reRender instead of column.

          • 2. Re: Ajax response without the structure of XHTML
            Well Nery Newbie

            Thank's for reply Ilya !

            This text is the least that can be generated  by an ajax response??

            The some values send on response are duplicate!

             

            <?xml version="1.0"?>
            <html  xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <title></title>
            </head>
            <body>
            <span style="display:none;" id="form1:j_id63">
            <script type="text/javascript">//<![CDATA[
            A4J.AJAX.Poll('form1',{'pollId':'form1:j_id63','similarityGroupingId':'form1:j_id63','parameters':{'form1:j_id63':'form1:j_id63'} ,'pollinterval':1000,'containerId':'form1:j_id62'} );
            //  
            //]]>
            </script>
            </span>
                <span id="form1:dataTable:0:name1">5400438</span>
                <meta name="Ajax-Update-Ids" content="form1:j_id63,form1:dataTable:0:name1" />
                <meta id="Ajax-Response" name="Ajax-Response" content="true" /><!-- MYFACES JAVASCRIPT -->
                <span id="ajax-view-state">
                <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="4df2fXcsdZJfbc+/w9DZTgh4QLcb2FPRLXtvNq3V2OkyJBT3C1AB4cuAGr7a+EmF3NDY6k/gqKSHNa6wP512VDS3suMdX2GzlL+DdW2tSSEqupn2OciykA==" /></span>
                <meta id="Ajax-Response" name="Ajax-Response" content="true" />
                <meta name="Ajax-Update-Ids" content="form1:j_id63,form1:dataTable:0:nome1" />
                <span id="ajax-view-state">
                <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="4df2fXcsdZJfbc+/w9DZTgh4QLcb2FPRLXtvNq3V2OkyJBT3C1AB4cuAGr7a+EmF3NDY6k/gqKSHNa6wP512VDS3suMdX2GzlL+DdW2tSSEqupn2OciykA==" />
                </span>
            </body>
            </html>

             

            Just out of curiosity... why it's duplicated? This is the issue!

            Thank's in Advance!