我们可以在对话框中显示p:editor吗? [英] Can we display the p:editor in the dialog?
问题描述
当我尝试将其放入对话框中时,p:编辑器未显示.如何将其放入对话框中?
Hi the p:editor is not displaying when i try to bring it inside the dialog.how to bring it in the dialog??
<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不在对话框之内呈现
but the normal p:editor rendered not inside the dialog like
<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>
如何解决这个问题?
推荐答案
我发现该解决方案无法加载内容,因为它无法通过dialog.js-Line No:136中的条件(包含在primeface罐3.3.1)
---------------- if(!this.loaded& this.cfg.dynamic)------------------在"show:function()"中....如果该"if"条件通过this.loadContents();将执行,并加载编辑器组件的内容.我在"if"条件之外使用this.loadContents()能够获取该编辑器"组件.我不确定条件失败的原因".谁能说出条件失败的原因吗????
I found the solution that its unable to load the content because that it fails to pass the condition in the dialog.js-Line No:136(contains in the primeface jar 3.3.1)
----------------if(!this.loaded && this.cfg.dynamic) ------------------
in the "show: function()" .... if that 'if' conditon pass this.loadContents(); will executed and editor component content will be loaded . I used the this.loadContents() outside that 'if' condition am able to get that "editor" component. I am not sure "Why that if condition fails" .Can any one tell Why that if condition fails?????
这篇关于我们可以在对话框中显示p:editor吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!