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>
4

1 回答 1

1

I think you need to surround the nested layout in a <p:layout> tag....so:

    <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>
于 2013-06-13T10:54:58.107 回答