5 Replies Latest reply on Jun 23, 2009 10:16 AM by Ilya Shaikovsky

    Rerender not working using <ui:include in page

    Kto ToTaki Newbie

      Hi
      Using the last version of RF.
      The code is simple, page consist of 3 panelGrids, 2 panelGrid has a toggle picture, clicking of this should open/close the 3 panelGrid.
      If page in 3 panelGrid is included using <ui:include.../> reRender doesn't run and <a4j:status is spinning indicating that the ajax request is never completed.
      If the included page is pasted in the man page, everything works.

      Here is the code, main Page :
      (without header including ) :

      <h:panelGrid columns="1" border ="0" styleClass="wFull" id="patientSearchPageGrid">
       <h:panelGrid columns="3" id="patientSearchMainGrid" styleClass="wFull" columnClasses=",center,center">
       <h:panelGrid >
       <h:outputText value="left grid" />
       </h:panelGrid>
       <h:panelGrid >
       <h:graphicImage value="#{patientsListMBean.showDetail ? '/pictures/toggle_left.png' : '/pictures/toggle_right.png'}" height="25" width="8" style="boder:1px" >
       <a4j:support event="onclick" action="#{patientsListMBean.switchDetail}" reRender="patientSearchMainGrid" />
       </h:graphicImage>
       </h:panelGrid>
       <h:panelGrid width="#{patientsListMBean.showDetail ? '315px' : '0px'}">
       <f:subview id="patientsListDetailView">
       <ui:include src="/jsf/csam/subpages/patientsListDetail.xhtml" />
       </f:subview>
       </h:panelGrid>
       </h:panelGrid>
      
      </h:panelGrid >
      


      and patientsListDetail.xhtml is :
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      
      <body>
       <h:outputText value="#{csamMessage.patientDetailAddress}" styleClass="detailTextLeft"/>
      </body>
      </html>