【问题标题】:How to use rich:modalPanel on top of other windows in application如何在应用程序中的其他窗口之上使用rich:modalPanel
【发布时间】:2013-05-08 09:07:34
【问题描述】:
我有丰富的模式面板,但在浏览按钮上单击我打开了丰富的模式面板,它还没有在其他窗口的顶部。一些屏幕部分重叠,所以我不能用作模态窗口。
我尝试了很多选择,但没有运气。
这是我的代码
<rich:modalPanel id="orderSearchAndSelectModalPanel" resizeable="false"
top="130" width="750" height="650" moveable="true" label="#{prop2.exportLabel}" domElementAttachment="form">
【问题讨论】:
标签:
richfaces
richfaces-modal
【解决方案1】:
rich:modalPanel 在 HTML 中表示为 div。这意味着模态面板不是单独的窗口(与启动模态面板显示的 UI 组件是同一窗口的一部分)。根据这些信息,您不能指望模态面板会位于其他窗口之上。
【解决方案2】:
我相信您的意思是如何使您的rich:modalPanel 与其他打开的 modalPanel 重叠。所以这很容易做到。 rich:modalPanel 具有 zindex 属性,它定义了 html 标记中的 z 轴坐标。您需要为不同的modelPanels为此类属性定义不同的值来定义谁与谁重叠。
例如,您的模型面板将如下所示:
<rich:modalPanel id="orderSearchAndSelectModalPanel" zindex="1000" resizeable="false"
top="130" width="750" height="650" moveable="true" label="#{prop2.exportLabel}" domElementAttachment="form" >