【发布时间】:2014-05-19 14:42:49
【问题描述】:
我有一个隐藏在rendered="false" 后面的组件。该组件仍会被初始化并启动一些资源浪费过程。
当他们的区域/组件/面板有rendered="false"时,如何确保组件不会被初始化?
源代码:
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;
}
如何预防
<rich:dropDownMenu binding="#{textBlockBean.textBlockMenu}"/>
在需要之前被触发。
提前致谢!
【问题讨论】:
标签: java jsf-2 richfaces rendering