p:commandbutton action funktioniert nicht im inneren von p:dialog

Habe ich eine p:dialog und es ist ein panel drin. Das problem ist der button "Speichern" wird die action-Methode nicht funktioniert. Es schadet auch nicht, der die Methode aufruft. Kann ich erreichen, die Methode def. mit Strg+lm so ist es kein problem mit der Methode name.

<h:body>
    <h:form id="createAppUserForm" prependId="false">
      ....
      <p:dialog id="newRoleDialogId"
                  header="Add New Role"
                  resizable="true"
                  draggable="true"
                  widgetVar="newRoleDetailsDialog"  
                  appendToBody="true"
                  >
            <p:panel id="newRoleDialogPanel">
                <p:panelGrid id="newRoleDialogPanelGrid" columns="2" style="width: 100%" styleClass="panelGridWithoutBorder">
                    <h:outputText value="Role Name :"/>
                    <p:inputText value="#{createAppUserController.selectedRole.name}"/>
                    <h:outputText value="Role Desc :"/>
                    <p:inputText value="#{createAppUserController.selectedRole.description}"/>
                </p:panelGrid>
                <center>
                    <p:commandButton value="Save"
                                     update="roleListDataTable newRoleDialogPanelGrid growlCreateAppUser"
                                     oncomplete="if (!args.validationFailed) newRoleDetailsDialog.hide()"                                     
                                     action="#{createAppUserController.saveNewRole()}"/>
                    <p:commandButton value="Cancel"                                         
                                     immediate="true"
                                     onclick="newRoleDetailsDialog.hide()" />
                </center>
            </p:panel>
        </p:dialog>
       </h:form>
    </h:body>
  • Wo ist das Formular? Wie haben Sie die Absicht, etwas zu Unterwerfen, ohne ein Formular?
  • Ich denke, Sie sollten wickeln Sie das <p:commandButton /> tags <p:form> tag.
  • Ich bearbeitet habe. Ich verstehe immer noch nicht, was das problem ist. Muss ich hinzufügen "Prozess" - Attribut?
  • Im Falle der appendToBody-Attribut wird nicht verwendet. Dass der dialog innerhalb der form sollte ok sein, nicht ?
InformationsquelleAutor hellzone | 2013-09-23
Schreibe einen Kommentar