Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 2 为什么<;h:panelGroup>;通过访问时找不到id<;f:子视图>;标签?_Jsf 2 - Fatal编程技术网

Jsf 2 为什么<;h:panelGroup>;通过访问时找不到id<;f:子视图>;标签?

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"

我得到的错误是:无法在组件j_idt26的上下文中找到它,因为
是一个

另见:

只需使用

 <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>