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:
<a4j:commandLink ajaxSingle="false" value="#{dpd:getResource('ADDRESSBOOK_OVERVIEW_SEARCH_EXTENDED_LBL')}" oncomplete="#{rich:component(addressSearchFormBacking.modalID)}.show()" reRender="#{addressSearchFormBacking.modalID},testSearch" type="button" > <f:setPropertyActionListener value="true" target="#{renderingController.renderAddressSearchModalPanel}" /> </a4j:commandLink>
<h:panelGroup id="testSearch" rendered="#{renderingController.renderAddressSearchModalPanel}"> <ui:include src="addressSearchFormMP.xhtml"> <ui:param name="param_ReRender" value="ADDRESSBOOK_TABS_FORM_1,ADDRESSBOOK_TABS_FORM_2,ADDRESSBOOK_TABLE_FORM" /> <ui:param name="param_FieldsetCSS" value="addressFormFieldset" /> </ui:include> </h:panelGroup>
you should not update conditionally rendered elements. wrap it input outputPanel which already present in tree and updaet outputPanel.