0

我正在尝试使用 Primefaces 布局,但出现以下错误。我用谷歌搜索了这个错误,但我在互联网的其他地方没有看到太多帮助。

UI 布局初始化错误

中心窗格元素不存在。

中心窗格是必需的元素

什么是中心窗格?

下面是我的 xhtml 文件中的代码。

 <p:layout >  

<p:layoutUnit position="north" >  
    <h:outputText value="North unit content." />  
</p:layoutUnit>

</p:layout>

这是如何引起的,我该如何解决?

4

2 回答 2

5

响应在答案中,如果您使用<p:layout>需要指定中心布局的类型,则如下所示:

<p:layout >  
<p:layoutUnit position="north" >  
    <h:outputText value="North unit content." />  
</p:layoutUnit>
<p:layoutUnit id="centerLayout" position="center">
 CONTENT 
</p:layoutUnit>
</p:layout>
于 2013-06-03T13:41:36.870 回答
0

在 6.2 版的对话框中 - 此处建议的修复没有任何作用。相反,这似乎是 Primefaces 6.2 中的一个错误,并已在此处得到解答:UI Layout Initialization Error PrimeFaces 6.2

于 2018-08-23T09:10:08.960 回答