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 ui:include在p:dataGrid中不起作用_Jsf_Jsf 2_Primefaces_Datagrid_Facelets - Fatal编程技术网

Jsf ui:include在p:dataGrid中不起作用

Jsf ui:include在p:dataGrid中不起作用,jsf,jsf-2,primefaces,datagrid,facelets,Jsf,Jsf 2,Primefaces,Datagrid,Facelets,我试图在数据网格中加载动态XHTML。但不知何故,它在p:outputlabel中显示了正确的数据,在ui:include中得到了null 这是我的代码片段 <p:dataGrid var="myBoard" value="#{dashBoard.widgetList}" columns="2" rows="2" paginator="true" id="widgetsGrid" paginatorTemplate="{Cur

我试图在数据网格中加载动态XHTML。但不知何故,它在p:outputlabel中显示了正确的数据,在ui:include中得到了null

这是我的代码片段

<p:dataGrid var="myBoard" value="#{dashBoard.widgetList}" columns="2"
                rows="2" paginator="true" id="widgetsGrid"
                paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}" 
                rendered="#{dashBoard.boardSize gt 0}">

        **// ***** Here is populate correct data ********
        <p:outputLabel value="#{myBoard.endpointUrl}" />  

        <p:panel id="one_#{myBoard.id}">
            <p:lightBox iframe="true" id="lighbox_one_#{myBoard.id}" height="550px" width="1024px" >
                <h:outputLink value="display" title="#{myBoard.name}">
                    <ui:insert name="widgetone">

                        **// ******* how come this would be null? *********

                        <ui:include src="#{myBoard.endpointUrl}"> 
                        </ui:include>

                    </ui:insert>
                    <f:param name="id" value="#{myBoard.id}" />
                </h:outputLink>
            </p:lightBox>
        </p:panel>      

    </p:dataGrid>

**//******以下是正确的数据********
**//*******这怎么会是空的*********
我尝试了不同的方法将其放入
c:if
中,但无法解决相同的问题。 primefaces是否支持该序列,或者是否有任何实现该序列的建议

提前感谢…

这是因为“#{myBoard.endpointUrl}”在“还原视图阶段”期间为空


有关JSF生命周期的更多详细信息:

感谢您的回复。。。那么,在p:dataGrid中是否有任何解决方法可以实现同样的效果呢?或者我应该使用其他组件?检查以下内容: