1 Reply Latest reply on Aug 20, 2009 10:16 AM by Ilya Shaikovsky

    conditional include: problem regarding ajax and the rendered

    Christoph Sauer Newbie

      Hi all,
      I have the problem that there are 5 modal panels in my application which are all ui:included at the main page of the application. Therefore all these panels and their backing beans are initialized when the portlet first loads and are included, though invisible, into the html-page presented to the user.
      In order to increase performance I want those modal panels only to be included into the page when they are needed. At the same time, I don't want to reload the full page to achieve this.

      The scenario I have in mind looks like this: the user clicks on a a4j:commandlink like this one:

      reRender="#{addressSearchFormBacking.modalID},testSearch" type="button" >
      target="#{renderingController.renderAddressSearchModalPanel}" />

      which refers to this component

      <h:panelGroup id="testSearch" rendered="#{renderingController.renderAddressSearchModalPanel}">
      <ui:include src="addressSearchFormMP.xhtml">
      <ui:param name="param_ReRender"
      <ui:param name="param_FieldsetCSS" value="addressFormFieldset" />

      The server then includes the new html-fragment for the modalpanel in its response and.. .. somehow .. works it into the existing page.. hopefully.

      But it doesn't seem to work. Perhaps I got something wrong about how the rendered attribute works, if someone could give me a clue as to what I'm doing wrong here I'd be very grateful.

      Thanks in advance