I'm having a component hiding behind a rendered="false"
. The component still gets initialized and starting some resource wasting processes.
How to make sure components don't get initialized when their region/component/panel has rendered="false"
?
Source code:
XHTML:
<a4j:region rendered="false">
<h:panelGroup rendered="false">
<rich:dropDownMenu binding="#{textBlockBean.textBlockMenu}" rendered="false" />
</h:panelGroup>
</a4j:region>
JAVA:
public UIComponent getTextBlockMenu() {
if (textblockMenu == null) {
textblockMenu = createTextBlok();
}
textblockMenuComponent = textblockMenu.build();
return textblockMenuComponent;
}
How can I prevent
<rich:dropDownMenu binding="#{textBlockBean.textBlockMenu}"/>
from getting triggered before needed.
Thanks in advance!