Note that there are some explanatory texts on larger screens.

plurals
  1. POprimefaces dialog disappears when commandButton is submitted
    primarykey
    data
    text
    <p>I have a proble with dialog, here is my add.xhtml : when I click "Envoyer demande" I'm displaying a message of confirmation "Demande d'inscription envoyée" in the dialog but dialog disappears after clicking button "Envoyer demande" .</p> <p>here is add.xhtm :</p> <pre><code>&lt;h:form&gt; &lt;h:commandLink value="Créer un compte" onclick="dlg3.show();return false;"/&gt; &lt;/h:form&gt; &lt;p:dialog id="modalDialoog" widgetVar="dlg3" draggable="false" resizable="false" dynamic="true" header="Inscription"&gt; &lt;center&gt; &lt;p:panel id="xyzBody"&gt; &lt;h:form id="inscri-f"&gt; &lt;h:panelGrid id="loginPan" columns="2" bgcolor="White"&gt; &lt;h:outputText value="Nom d'utilisateur :" /&gt; &lt;p:inputText id="username" value="#{demandeBean.login}"&gt;&lt;/p:inputText&gt; &lt;h:outputText value="Mot de passe :" /&gt; &lt;p:password id="pwd" value="#{demandeBean.pwd}"/&gt; &lt;h:commandButton value="Envoyer demande" update=":inscri-f:cr" actionListener="#{demandeBean.envoi_dde}"&gt;&lt;/h:commandButton&gt; &lt;h:commandButton value="Retour" action="page1?faces-redirect=true"&gt;&lt;/h:commandButton&gt; &lt;p:outputPanel id="cr"&gt; &lt;h:outputText rendered="#{demandeBean.saved}" value="#{demandeBean.message}"/&gt; &lt;/p:outputPanel&gt; &lt;/h:panelGrid&gt; &lt;/h:form&gt; &lt;/p:panel&gt; &lt;/center&gt; &lt;/p:dialog&gt; </code></pre> <p>my addBean.java :</p> <pre><code> @ViewScoped public class DemandeBean implements Serializable{ private static final long serialVersionUID = 1L; DdeDAO ndao = new DdeDaoImpl(); private String login; private String pwd; private String message = ""; private boolean saved = false; //getters and setters of all attributes public void envoi_dde(){ Demande d = new Demande(); d.setNom_ut(this.login); d.setPwd(this.pwd); ndao.nouvelle_dde(d); saved = true; this.setMessage("Demande d'inscription envoyée"); } </code></pre> <p>I want dialog not to disappear after clicking button "Envoyer demande" .</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload