Jsf 2 为什么<;h:panelGroup>;通过访问时找不到id<;f:子视图>;标签?
我得到的错误是:无法在组件j_idt26的上下文中找到它,因为Jsf 2 为什么<;h:panelGroup>;通过访问时找不到id<;f:子视图>;标签?,jsf-2,Jsf 2,我得到的错误是:无法在组件j_idt26的上下文中找到它,因为是一个 另见: 只需使用 <h:panelGroup id="userPanel"><f:subview rendered="#{searchView.isUser}"> <h:commandButton value="test" action="#{searchAction.doFindUsers}" > <f:ajax execute="@this"
是一个
另见:
只需使用
<h:panelGroup id="userPanel"><f:subview rendered="#{searchView.isUser}">
<h:commandButton value="test" action="#{searchAction.doFindUsers}" >
<f:ajax execute="@this" event="action" render="userPanel" />
</h:commandButton> </f:subview></h:panelGroup>
或者
(开销只有一点点)
或者在这个特定的示例中,直接按命令按钮(当然,您的情况比这个更复杂)
另见:
<h:panelGroup id="userPanel">
<h:panelGroup rendered="#{searchView.isUser}">
<h:commandButton value="test" action="#{searchAction.doFindUsers}">
<f:ajax execute="@this" event="action" render="userPanel" />
</h:commandButton>
</h:panelGroup>
</h:panelGroup>
<h:panelGroup id="userPanel">
<ui:fragment rendered="#{searchView.isUser}">
<h:commandButton value="test" action="#{searchAction.doFindUsers}">
<f:ajax execute="@this" event="action" render="userPanel" />
</h:commandButton>
</ui:fragment>
</h:panelGroup>
<h:panelGroup id="userPanel">
<h:commandButton value="test" action="#{searchAction.doFindUsers}" rendered="#{searchView.isUser}">
<f:ajax execute="@this" event="action" render="userPanel" />
</h:commandButton>
</h:panelGroup>