2011-01-19 89 views
2

我有一個模態面板,其中包含動態包含的頁面。該頁面包含搜索表單。點擊搜索按鈕後,顯示內容。如何在modalpanel中添加滾動?

內部頁面高度小於300px。搜索後頁面高度大於600px。所以我無法靜態設置高度。在搜索的時候,modalpanel的部分內容隱藏在瀏覽器中。所以當頁面大於瀏覽器時,我需要放置滾動條。

我該如何做到這一點?

回答

5

定義

<style> 
.scroll_div{ 
overflow: scroll; 
width:100%; 
height:100%; 
} 
</style> 

和應用

<rich:modalPanel id="panel" width="350" height="100"> 
<div class="scroll_div"> 

出處:http://community.jboss.org/message/66213

或者

覆蓋的CSS模態面板

.rich-mpnl-panel { 
    position: inherit; 
} 
+0

嗨Jigar,THX您的快速reply.But如果我把高度=「100」我限制modalpanel.But的高度,我需要得到滾動而不限制模式panel.Is的高度有任何其他方式? – 2011-01-19 08:15:54

0

它通過該代碼爲我工作:

.dr-mpnl-pnl { 
     overflow: auto !important 
    } 

,並添加這個組件:

<rich:componentControl for="dynadetailModalPanel" 
    attachTo="showPanelButton" operation="show" event="onclick" /> 

<rich:modalPanel id="dynadetailModalPanel" height="500" width="500" > 
     ... 
0

添加所需的高度和流量作爲設置滾動到款式豐富modalPanel。

<rich:modalPanel style="height:600px;overflow:scroll;">