4 Replies Latest reply on Jan 31, 2012 3:10 PM by Nikolai Alexeev

    a4j:jsFunction rerender doesn't work

    Nikolai Alexeev Newbie

           Hi!  I have a problem of making dynamic context menu so I need to load pages with needed modal panels dynamically which i was hoping to achieve with a4j:include as ui:include can't be rerendered. But i've faced a strange problem with a4j:jsFunction: it doesn't want to rerender elements if the page with this function is included with a4j:include (with ui:include everything works fine). Why does it happen and how to fix it?

           Here's how i include pages:

      <a4j:include id="invoicesSubview" viewId="#{MbContextMenu.panelViewId}">
          <ui:param name="viewId" value="invoicesSubview"/>
          <ui:param name="viewIdColon" value="invoicesSubview:"/>
          <ui:param name="fromCtx" value="true"/>

           And here's a part of page with panel:

      <h:form id="rptInitForm">
          <a4j:jsFunction action="#{MbReportsContext.initializeModalPanel}" 
                  name="initializeReportPanel#{viewId}" reRender="#{viewIdColon}reportRunForm">
      <rich:modalPanel id="reportRunPanel"  autosized="true" minWidth="300" minHeight="50"
          onbeforeshow="if (#{empty fromCtx ? false : true}) initializeReportPanel#{viewId}()">
           <f:facet name="header">
               <h:outputText value="#{lblRpt.run_report}"/>
           <h:form id="reportRunForm">


      So, the function ("initializeReportPanel#{viewId}") itself is called, bean's method ("#{MbReportsContext.initializeModalPanel}") is called too, but the form isn't rerendered although its id is formed correctly. All the same code when called from the same page but included with ui:include (inside f:subview) works fine. Is it some a4j:include issue or may be i do something wrong?


      I'm using JSF 1.2 and Richfaces 3.3.3