1 Reply Latest reply on Jul 9, 2008 8:21 AM by lanceb185

    Targeting specific form element with a4j:support reRender?

    lanceb185

      Hi

      In the basic code snippet below, how do I get the a4j:poll to re-render only "clock" (short of using separate forms)? What I'm finding is that the entire form (main_form) is updated, causing the a4j:status to flicker at the poll interval.

       <h:form id="main_form">
       <h:panelGrid>
       <h:outputText id="clock" value="#{bean.time}"/>
       <%-- this updates both the clock and the entire form, causing status to flicker --%>
       <a4j:poll id="clock_updater" ajaxSingle="true"
       interval="1000" reRender="clock"/>
       </h:panelGrid>
       <h:panelGrid>
       <a4j:status id="status" startText="doing something" stopText="done"/>
       </h:panelGrid>
       </h:form>
      


      Help much appreciated
      Lance



        • 1. Re: Targeting specific form element with a4j:support reRende
          lanceb185

          For the record, I solved the like this with a4j:region:

          <h:form id="main_form">
           <a4j:region renderRegionOnly="true">
           <h:panelGrid>
           <h:outputText id="clock" value="#{bean.time}"/>
           <a4j:poll id="clock_updater" ajaxSingle="true"
           interval="1000" reRender="clock"/>
           </h:panelGrid>
           </a4j:region>
           <h:panelGrid>
           <a4j:status id="status" startText="doing something" stopText="done"/>
           </h:panelGrid>
           </h:form>