Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.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
Ajax 动态插入的primefaces组件未正确渲染_Ajax_Components_Rendering_Primefaces - Fatal编程技术网

Ajax 动态插入的primefaces组件未正确渲染

Ajax 动态插入的primefaces组件未正确渲染,ajax,components,rendering,primefaces,Ajax,Components,Rendering,Primefaces,为什么Primefaces组件在部分页面更新时不能正确呈现 问题是- 我有一个ui视图:include- <ui:include src="#{navBean.viewId}.xhtml}"/> 和p:commandButton- <p:commandButton action="#{navBean.setViewId('page1')}" value="Load DataTable"/> 而page1.xhtml就是我有一个p:dataTable的地方 &l

为什么Primefaces组件在部分页面更新时不能正确呈现

问题是-

我有一个ui视图:include-

<ui:include src="#{navBean.viewId}.xhtml}"/>

和p:commandButton-

<p:commandButton action="#{navBean.setViewId('page1')}" value="Load DataTable"/>

而page1.xhtml就是我有一个p:dataTable的地方

<ui:composition xmlns ...
    <h:head/>
        <h:form>
            <p:dataTable ...
解决方案很简单-

包括一个

<h:head/>

如下-

<ui:composition xmlns ...
    <h:head/>
        <h:form>
            <p:dataTable ...

不管是谁否决了这个问题,他至少可以留下一个关于他为什么否决这个问题的提示,或者一些或一些导致问题的线索,这样我就可以着手解决这个问题了。直接投票然后离开,这有点粗鲁。