5 Replies Latest reply on Apr 28, 2009 12:13 PM by Juan Gonzalez

    a4j:poll re-rendering/decoding all the xhtml page?

    Juan Gonzalez Newbie

      Hi I have a problem that could be a performance issue in the xhtml (Facelets) that I am currently developing.

      I have a a4j:poll that find new messages for the user. To achieve this, I have a main facelet template that have an sticky footer with the a4j:poll.

      I have a Facelet template like this:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      <html xmlns="http://www.w3.org/1999/xhtml"
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
      <meta http-equiv="pragma" content="no-cache" />
      <meta http-equiv="cache-control" content="no-cache" />
      <meta http-equiv="expires" content="0" />
      <meta http-equiv="cache-control" content="no-store" />
      <title><ui:insert name="title">Title</ui:insert></title>
      <head> ....
      <h:form >
       <rich:modalPanel .id="ajaxErrorModalPanel">
       <a4j:status id="ajaxLoadingStatusModal">
      <div id="page">
       <div id="header">
       <ui:insert name="header"> </ui:insert>
       <div id="body">
       <ui:insert name="body"> </ui:insert>
      <div id="stickyFooter">
       <h:panelGroup rendered="#{someCondition}">
       <a4j:poll id="messagesPoll"
       timeout="60000" status="loadingMessagesStatus"
       reRender="userMessagesPanel" ajaxSingle="true"/>
       <rich:toolBar id="stickyToolBar">
       <a4j:status id="loadingMessagesStatus">
       <f:facet name="start">
       <h:graphicImage .../>/indicator.gif"
       height="8px" width="8px" />
       <rich:toolBarGroup location="left">
       <a4j:outputPanel id="userMessagesPanel">

      And I have a page with a rich:datatable that uses the same facelets template (same as written above).

      I saw that in my server logs the rich:datatable was updating every time tha poll was executed.

      I have been searching over the forums here for some weeks, and all the solutions mentioned (putting the poll in another h:form, another a4j:region, ajaxSingle=true", limitToList="true") didn't work.

      Please how could I execute the poll without interfere with the rest of the xhtml page? I am desperated!

      Thanks very much!