使组件在 DOM 中永久可用的最佳方法是什么?我目前有以下内容:
<h:form id="navigationForm">
<pou:menu id="navigationMenu">
<pou:submenu label="#{web['NavigationMenuLabel']}">
<pou:menuitem value="#{web['NavigationMenuDashboard']}"
action="#{accountData.viewAccountDashboard()}"
update=":accountForm:accounts"/>
<pou:menuitem value="#{web['NavigationMenuRoleOneAccounts']}"
action="#{accountData.viewRoleOneAccounts()}"
update=":accountForm:accounts"/>
</pou:submenu>
</pou:menu>
</h:form>
<h:form id="accountForm" rendered="#{accountData.renderTables()}">
#{accountData.populateDataTable()}
<pou:dataTable id="accounts"
var="account"
paginator="true"
rows="10"
emptyMessage="#{web['NoAccountsData']}"
selection="#{accountData.selectedAccounts}"
rowKey="#{account.uuid}"
value="#{accountData.accountDataModel}">
...
问题是......毫不奇怪,accountForm 并不总是存在(这就是重点),因此它不会更新。