2013-06-24 42 views
2

下面是代碼直接從primefaces複製整頁的演示Primefaces整頁版面切換不靈

<p:layout fullPage="true"> 

<p:layoutUnit position="north" size="100" header="Top" resizable="true" closable="true" collapsible="true"> 
    <h:outputText value="North unit content." /> 
</p:layoutUnit> 

<p:layoutUnit position="south" size="100" header="Bottom" resizable="true" closable="true" collapsible="true"> 
    <h:outputText value="South unit content." /> 
</p:layoutUnit> 

<p:layoutUnit position="west" size="200" header="Left" resizable="true" closable="true" collapsible="true"> 
    <h:outputText value="West unit content." /> 
</p:layoutUnit> 

<p:layoutUnit position="east" size="200" header="Right" resizable="true" closable="true" collapsible="true" effect="drop"> 
    <h:outputText value="Right unit content." /> 
</p:layoutUnit> 

<p:layoutUnit position="center"> 
    <h:form> 
     This fullPage layout consists of five different layoutUnits which are resizable and closable by default. 

    </h:form> 
</p:layoutUnit> 

當我運行這段代碼的可封閉的可伸縮按鈕是有,但什麼都不做。任何想法可能會造成這種情況?

回答

2

幾件事情:
1)你正在關閉「p:layout」嗎?
2)小心使用h:表格,也許你在p:layout中使用它,如果是的話,抹去它。
3)你有任何錯誤信息?

3

您應該爲每個layoutunit使用h:form。