面板网格组件中的PrimeFaces(JSF)布局

时间:2014-02-26 14:15:00

标签: jsf layout primefaces

我正在尝试在面板网格组件中创建一个布局,不知何故它只是不起作用。有人知道问题出在哪里以及有什么建议如何做得更好?

这是我的源代码:

<p:tab id="tab3" title="One of a few tabs">
<h:panelGrid>
    <p:layout>
        <p:layoutUnit position="center">
            <h:outputText value="Some other components" />
        </p:layoutUnit>
        <p:layoutUnit position="north">
            <h:outputText value="Some other components" />
        </p:layoutUnit>
        <p:layoutUnit position="west">
            <h:outputText value="Some other components" />
        </p:layoutUnit>
        <p:layoutUnit position="east">
            <h:outputText value="Some other components" />
        </p:layoutUnit>
    </p:layout>
</h:panelGrid>

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

问题是panelGrid;请改用panelGroup,页面将正确显示。此代码片段中的另一个错误是:

<p:tab id="tab3" title="One of a few tabs">

缺失:

</p:tab>
相关问题