2014-09-21 64 views
0

我得到了這樣的問題,當我想分割佈局和layoutunits的對話框時,只有北部佈局單元的上部10px呈現。在渲染的那個小部分中,您可以向下滾動以查看北部「12」和中心「12」的值。jsf primefaces對話框沒有完全呈現裏面的佈局

<h:form id="mainDllg"> 
     <p:dialog id="mainDlg" header="12" widgetVar="mainDlg" 
      rendered="true" closeOnEscape="true" 
      style="width:99% !important; height:99% !important" 
      resizable="false" modal="true"> 
      <p:outputPanel> 

       <p:layout> 
        <p:layoutUnit position="north">12</p:layoutUnit> 

        <p:layoutUnit position="center">12</p:layoutUnit> 
       </p:layout> 

      </p:outputPanel> 
     </p:dialog> 
    </h:form> 

output http://i61.tinypic.com/wc0h92.jpg

回答

0
<h:form id="mainDllg"> 
     <p:dialog id="mainDlg" header="12" widgetVar="mainDlg" 
      rendered="true" closeOnEscape="true" 
      resizable="false" modal="true"> 
      <p:outputPanel> 

       <p:layout style="min-width:400px;min-height:200px;"> 
        <p:layoutUnit position="north" size="30">12</p:layoutUnit> 

        <p:layoutUnit position="center">12</p:layoutUnit> 
       </p:layout> 

      </p:outputPanel> 
     </p:dialog> 
    </h:form> 

你應該試試這個。

+0

就是這樣:)我意識到客戶端屏幕尺寸與圖形環境Java庫,但後來我在部署時出現問題。有沒有一種方法可以直接在樣式attribut中使用JavaScript(也許是min-width:screen.width px)? – flyOWX 2014-12-23 13:37:33