简体   繁体   中英

How to add scroll in modalpanel?

I have a modal panel which contains the dynamically included page. The page contains search form. After click the search button it shows the contents.

Intially the page height is less than 300px. After search the page height is more than 600px. So i cannot set the height statically. At that time of search the modalpanel partial contents are hide in the browser. So i need to put the scrollbar when the page is larger than browser.

How can i achieve that?

define

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

and apply

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

Source :http://community.jboss.org/message/66213

Or

override the css modal panel

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

it work for me by this code:

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

and add this component:

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

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

添加所需的高度并设置流,以滚动到样式丰富的modalPanel。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM