Primefaces 3.0 dialog

UI Components for JSF
Post Reply
rubi
Posts: 160
Joined: 24 May 2010, 16:53

20 Feb 2011, 20:52

hi;

just tried 3.0 because of curiosity. Most of the things seems backward compatible except dialog.

if dialog is placed inside a form and the form is updated, the content of the dialog appears at the end of the page.
I guess its...Too early to report bugs for 3.0....


Thanks primefaces;
Glassfish V3.1.1,Mojarra 2.1.2, PrimeFaces-3.0RC1

Franke
Posts: 49
Joined: 12 Oct 2010, 08:41

21 Feb 2011, 09:49

Dialog has never worked inside a form, it should not (and I see no need for it) to be enclosed in a form. Just put a form inside it instead and make it post with ajax when clicking a button or closing it.
Using PF 3.0 with default JSF implementation of JBoss 6

callahan
Posts: 768
Joined: 27 May 2010, 22:52

21 Feb 2011, 10:31

A dialog can be inside a form. The issue is that neither a dialog nor any of its parent components should be updated, only its content should be updated. For more info see: http://primefaces.prime.com.tr/forum/vi ... 269#p27269

jaideralba
Posts: 51
Joined: 06 Sep 2010, 23:01
Location: São Paulo - Brazil

21 Feb 2011, 21:37

For me, the problem of "duplicated p:dialog" only happened with p:commandButton.

Code: Select all

<p:commandButton action="#{Bean.method}" process="@form" update="@form" />
When I used h:commandButton the problem not happened:

Code: Select all

<h:commandButton action="#{Bean.method}">
    <f:ajax execute="@form" render="@form" />
</h:commandButton>
:|
hope it helps.
Mojarra 2.0.2 (FCS b10)
GlassFish 3.0.1
PrimeFaces 2.2.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Feb 2011, 10:43

JSF implementation does not execute all the javascript in partial response whereas PrimeFaces does as it is more powerful in this particular case based on jquery. So dialog is recreated.

In summary, do not update dialogs directly or their containers, just update their contents.

Ajax with JSF is very easy I know, but there are best practices. Would you recreate all the widgets if you were using a javascript library like vanilla jQuery UI without JSF. No right? Same applies here.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 57 guests