繁体   English   中英

如何在modalpanel中添加滚动?

[英]How to add scroll in modalpanel?

我有一个模式面板,其中包含动态包含的页面。 该页面包含搜索表单。 单击搜索按钮后,它将显示内容。

页面高度最初小于300像素。 搜索后,页面高度超过600像素。 所以我不能静态设置高度。 在搜索时,模式面板的部分内容隐藏在浏览器中。 所以我需要在页面大于浏览器时放滚动条。

我该如何实现?

限定

<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;
}

它通过以下代码为我工作:

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

并添加以下组件:

<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;">

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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