Salut,
J'ai un problème au niveau de dialog lorsque j'ajoute appendToBody, le bouton Enregistrer ne fonctionne pas

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
<h:form id="datatable">
            <p:growl id="growl" showDetail="true" sticky="false"  />
            <p:dataTable id="Tab" var="categorie" value="#{categorieBean.listCategorie}" widgetVar="PersonneTable"
                         emptyMessage="Categorie non trouvé" paginator="true" rows="5" 
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" style="width:500px;font-size:13px;margin-left: 150px">
                <f:facet name="header">
                    <h:outputText value="Liste des Categorie" />
                </f:facet>
                <!--Column Code-->
                <p:column id="codeCategorie" headerText="Code Categorie" filterBy="#{categorie.codeCategorie}" filterMatchMode="exact">
                    <h:outputText value="#{categorie.codeCategorie}" />
                </p:column>
                <!--Column Libelle-->
                <p:column id="Libelle" headerText="Libelle" >
                    <h:outputText value="#{categorie.libelle}" />
                </p:column>
                <!--Button Ajouter-->
                <f:facet name="footer">
                    <p:outputPanel>
                        <h:form id="AjoutC">
                            <p:commandButton value="Ajouter Categorie" icon="ui-icon-adds" 
                                             actionListener="#{categorieBean.ajoutEvent(actionEvent)}" update=":edit:editC" 
                                             oncomplete="categorieAjout.show()" />
                        </h:form>
                    </p:outputPanel>
                </f:facet>
            </p:dataTable>
        </h:form>

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
   <h:form id="edit">
            <p:dialog id="editC" header="Ajout Categorie" widgetVar="categorieAjout" modal="true" 
                      showEffect="fade" hideEffect="explode" resizable="false" appendToBody="true">
                <p:growl id="growl" showDetail="true" sticky="false" life="10000"/>
 
                <h:panelGrid id="display" columns="2" cellpadding="4" style="margin:0 auto;">
                    <f:facet name="header">
                    </f:facet>
                    <h:outputLabel for="nom" title="Nom" value="Nom:" style="color: crimson;" />
                    <p:inputText value="#{categorieBean.categorie.libelle}"  id="nom" required="true"/>
                </h:panelGrid>
 
                <p:separator/>
                <p:commandButton value="Enregistrer" update=":datatable:Tab, growl" 
                                 actionListener="#{categorieBean.ajoutp(actionEvent)}" oncomplete="categorieAjout.hide()" 
                                 icon="ui-icon-check"/>
                <p:commandButton id="modiferCancel" oncomplete="categorieAjout.hide()" icon="ui-icon-cancel" 
                                 title="Cancel" value="Cancel"/>
            </p:dialog>
        </h:form>
Quelqu'un saurait-il m'indiquer comment résoudre ce problème ?

Merci d'avance pour votre aide.