【发布时间】:2015-02-03 13:16:22
【问题描述】:
嗨,当我尝试将 p:editor 带入对话框时,它没有显示。如何将其带入对话框??
<p:commandButton value="Submit" update="display" oncomplete="dlg.show()" icon="ui-icon-disk" />
<p:dialog header="Content" widgetVar="dlg" showEffect="fade" hideEffect="fade">
<p:editor id="editor" widgetVar="editorWidget" value="#{editorView.text}" width="600" />
</p:dialog>
它的呈现方式
<div id="form1:editorsad" style="visibility:hidden">
<textarea id="form1:editorsad_input" name="form1:editorsad_input"></textarea>
</div>
但正常的 p:editor 不会像这样在对话框内呈现
<div id="form1:editor" style="">
<div class="ui-editor" style="width: 600px; height: 250px;">
<div class="ui-editor-toolbar" style="height: 53px;">
<textarea id="form1:editor_input" name="form1:editor_input" style="display: none; width: 600px; height: 197px;"></textarea>
<iframe frameborder="0" src="javascript:true;" style="display: block; width: 600px; height: 197px;">
</div>
</div>
如何解决这个问题??
【问题讨论】:
-
您使用的是哪个 PF 版本?你有 JS 错误吗?
-
在 PrimeFaces 5.1 上运行良好(在 JSF 2.3.0-m01 上运行)。我刚刚更改了
<p:commandButton>的oncomplete属性的值,以反映PrimeFaces 4.0 之后所做的新更改oncomplete="PF('dlg').show()"。 -
我正在使用 primefaces 3.3.1,但对话框和编辑器的渲染器类没有太大变化......我没有收到任何 js 错误,只有警告..
标签: jsf primefaces