【发布时间】:2017-11-09 10:29:35
【问题描述】:
有没有办法从使用 Primefaces 对话框框架打开的对话框中删除标题?
我知道我可以设置自定义标头(请参阅代码片段),但是如何将其删除?我不想从所有对话框中删除它,因此不能选择覆盖 CSS 类 .ui-dialog .ui-dialog-titlebar。
Map<String,Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("width", 640);
options.put("height", 340);
options.put("contentWidth", "100%");
options.put("contentHeight", "100%");
options.put("headerElement", "customheader");
RequestContext.getCurrentInstance().openDialog("viewCars", options, null);
【问题讨论】:
-
你知道你可以添加一个 css 类并使用它从一个对话框中删除它
-
嗯,但是如何添加呢?我已经尝试直接在 xhtml 页面中包含一个 css 规则,覆盖 .ui-dialog .ui-dialog-titlebar 并使用 display:none 但它不起作用。我尝试在 javascript-ready 函数中添加 css 属性,但它也不起作用。
标签: css primefaces dialog