2013-06-13 32 views
0

這是我的代碼,但如果我刪除了裏面的佈置佈局團結正常工作爲什麼我不能讓另一個佈局單元到佈局單元

<p:layout style="width:850px;height:300px;" id="layout"> 
    <p:layoutUnit position="west" resizable="true" size="230" minSize="40" maxSize="200" > 
       <center> 
      <p:graphicImage value="/resources/image/miseAjour.jpg" /> 
       </center> 
    </p:layoutUnit> 

<p:layoutUnit position="center" header="Composant"> 
    /*I wont to compose this layout 
    <p:layoutUnit position="center" header="element"> 
        </p:layoutUnit> 

        <p:layoutUnit position="south" header="definiton"> 
        </p:layoutUnit> 
    </p:layoutUnit> 

</p:layout> 
+0

你必須更具體 - 有什麼問題? – dratewka

回答

1

我認爲你需要圍繞嵌套佈局在<p:layout>標籤....如此:

<p:layout style="width:850px;height:300px;" id="layout"> 
     <p:layoutUnit position="west" resizable="true" size="230" minSize="40" maxSize="200" > 

       <p:graphicImage value="/resources/image/miseAjour.jpg" /> 

     </p:layoutUnit> 

    <p:layoutUnit position="center" header="Composant"> 
    //nested layout 
     <p:layout> 
     <p:layoutUnit position="center" header="element"> 
         </p:layoutUnit> 

         <p:layoutUnit position="south" header="definiton"> 
         </p:layoutUnit> 
    </p:layout> 
    //end of nested layout 
     </p:layoutUnit> 

    </p:layout> 
+0

也不起作用。我認爲不支持 –

+0

不確定爲什麼在標記中有其他

標記 – zargarf

+0

上面的代碼適用於我,因此它在我正在使用的Primefaces 3.5中受支持。確保你擺脫了標記中的

標籤 - 這是無效的。你真的得到了什麼錯誤?請嘗試複製並粘貼我的代碼到一個空白的xhtml頁面,只有一個h:表格 – zargarf