带有 modal=true 的 Primefaces 对话框无法正常工作 [英] Primefaces dialog with modal=true not working properly

查看:30
本文介绍了带有 modal=true 的 Primefaces 对话框无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法实现具有属性 modal=true 的(primefaces)dialog 框.它在 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.

我怎样才能让它正常工作?

How can I make it work properly ?

推荐答案

根据对话部分的 Primefaces Guide 2.2:

Per the Primefaces Guide 2.2 on the Dialog section:

appendToBody FALSE Boolean 将对话框附加为文档正文的子级.

appendToBody FALSE Boolean Appends dialog as a child of document body.

使用 Primefaces 对话框时,请利用 appendToBody 属性来启用对话框叠加层.Primefaces 对话框基于 YUI 对话框组件,该组件在模式对话框叠加方面存在类似问题.

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 对话框无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆