Page 1 of 2

p:editor inside p:dialog - gets double rendered

Posted: 18 Jun 2010, 12:12
by ghagleit
Hi,

If i place an p:editor inside an p:dialog the editor gets rendered twice.
Neither the first nor the second does function at all, you can click but nothing happens.

We are using latest Version of PF 2,0,3 SS and MyFaces

Code: Select all

 <p:dialog widgetVar="editorDialog" width="600" height="600">
                <h:form>
                    <p:editor id="litDeEditor" binding="#{announcement.editorDe}" widgetVar="editorDe" title="Test" />
                    <p:commandButton id="testT" actionListener="#{announcement.processEditorInput('literatureDe')}"  onclick="editorDe.saveHTML();"/>
                </h:form>
</p:dialog>
Can somebody try this please?

best regards
g.h

Re: p:editor inside p:dialog - gets double rendered

Posted: 22 Jun 2010, 11:52
by buett
There are some other problems, when using dialog and editor in a page.
e.g.

Code: Select all

<h:outputLink value="javascript:void(0)" onclick="dlg.show()">Open Dialog</h:outputLink>
<p:dialog header="hello" widgetVar="dlg">
...
</p:dialog>
<p:editor/>
this code works fine. but changing order for example:

Code: Select all

<p:editor/>
<h:outputLink value="javascript:void(0)" onclick="dlg.show()">Open Dialog</h:outputLink>
<p:dialog header="hello" widgetVar="dlg">
...
</p:dialog>
So the dialog doesn't work (means: it is not shown, when I click the link) and the editor is not shown correctly. All you can see is the textarea instead of the whole dialog.

Also the Scheduler embedded in a dialog is shown twice like the problem above with editor in a dialog.

regards, Marcus

Re: p:editor inside p:dialog - gets double rendered

Posted: 23 Jun 2010, 11:47
by cagatay.civici
I've replicated the issue, please create an issue ticket for this.

Re: p:editor inside p:dialog - gets double rendered

Posted: 04 Oct 2010, 20:47
by kency

Re: p:editor inside p:dialog - gets double rendered

Posted: 04 Oct 2010, 21:00
by cagatay.civici
Yes, this is a known issue;

http://code.google.com/p/primefaces/iss ... ail?id=957

Although we couldn't look in detail, couldn't figure out why this happens, even with new editor of 2.2.RC1, this happens. So I assume there is an issue with dialog and iframe usage.

Re: p:editor inside p:dialog - gets double rendered

Posted: 05 Oct 2010, 04:40
by kency
can version 2.2 stable you fix it?

Re: p:editor inside p:dialog - gets double rendered

Posted: 24 Oct 2010, 14:43
by cagatay.civici
Should be fixed now.

Re: p:editor inside p:dialog - gets double rendered

Posted: 24 Oct 2010, 17:16
by kency
Now? where can i download new Version?

Re: p:editor inside p:dialog - gets double rendered

Posted: 25 Oct 2010, 02:13
by bumble.bee
You'll need to build from source to get the latest changes. The source can be obtained here:

http://code.google.com/p/primefaces/source/checkout

Re: p:editor inside p:dialog - gets double rendered

Posted: 25 Oct 2010, 02:31
by ethermion
Once a day there is a Hudson build, and you can pick up the .jar here. No need to d/l source and build yourself.

http://repository.prime.com.tr/org/prim ... -SNAPSHOT/

-e