问题描述
我无法用属性 modal = true
实现一个(primfaces)对话框
它与modal = false正确地工作,但是当我尝试设置 modal = true
时,即使对话框覆盖也会失效。
I am unable to achieve a (primefaces)dialog
box with attribute modal=true
. It works correctly with modal=false, but when I try to set modal=true
, even the dialog box overlay becomes inactive.
如何使其正常工作?
推荐答案
>
Per the Primefaces Guide 2.2 on the Dialog section:
$ b b
当使用Primefaces对话框时,使用appendToBody属性来启用对话框覆盖。
When using the Primefaces dialog utilize the appendToBody attribute to enable the dialog overlay to be found. The Primefaces dialog is based on the YUI dialog component which has a similar issue for modal dialog overlays.
操作对话框覆盖将涉及重写覆盖的CSS类并指定你自己的不透明度。
Manipulating the dialog overlay will involve overriding the CSS class of the overlay and specifying your own opacity.
这篇关于使用modal = true的Primefaces对话框无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!