p:commandbutton action在p:dialog中不起作用
我有ap:对话框,里面有一个面板。问题是“保存”按钮的操作方法不起作用。它甚至不调用该方法。我可以达到方法def。使用ctrl + lm,因此方法名称没有问题。
<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>
桃花长相依
梵蒂冈之花
相关分类