📅  最后修改于: 2021-01-08 04:36:24             🧑  作者: Mango
它是一个面板组件,可以覆盖页面上的其他元素。它用于创建一个弹出窗口,也可用于显示其他元素。它提供了show()和hide()两种方法来管理组件的可见性。
用于在JSF应用程序中创建对话框。它还具有下表列出的各种属性。
Attribute | Default value | Type | Description |
---|---|---|---|
header | null | String | It is used to set text of the header. |
draggable | true | Boolean | It specifies draggability. |
resizable | true | Boolean | It specifies resizability. |
modal | false | Boolean | It enables modality. |
visible | false | Boolean | When enabled, dialog is visible by default. |
width | auto | Integer | It is used to set width of the dialog. |
height | auto | Integer | It is used to set height of the dialog. |
minWidth | 150 | Integer | It is used to set minimum width of a resizable dialog. |
minHeight | 0 | Integer | It is used to set minimum height of a resizable dialog. |
style | null | String | It is used to set inline style of the dialog. |
showHeader | true | Boolean | It defines visibility of the header content. |
positionType | fixed | String | It defines whether dialog will be kept in viewport on scroll or keep its position. |
responsive | false | Boolean | It is used to make component responsive. |
footer | null | String | It is used to set text of the footer. |
在下面的示例中,我们正在实现组件。本示例包含以下文件。
// dialog.xhtml
Dialog
输出: