I am facing this issue on minimal two screens/views with many commandButtons that open dialogs in new window. I am using Primefaces 5.3.5 and JSF Mojarra 2.2.8. These actions/actionListeners open a new dialog in popup window. The first commandButton always open new dialog but the others commandButtons do nothing.
<h:form id="dbuserForm">
<!-- New User Button. This one fires a dialog -->
<p:commandButton id="newUserGroupBtn" value="#{msg.WEB_BUTTONS_NEW}" style="margin-right: 2px;" actionListener="#{appUserData.toggleNewModal}" icon="fa fa-plus" accesskey="n" update="@form">
<p:ajax event="dialogReturn" update="@form" />
</p:commandButton>
<p:dataTable id="tableDbUser" scrollable="true" width="100%" value="#{tabDbUser.listArray}" var="item" selectionMode="single" rowKey="#{item.idbuserId}">
<!-- Delete User Button -->
<p:column>
<p:commandButton id="deleteAppUserBtn" value="#{msg.WEB_BUTTONS_DELETE}" style="margin-right: 2px;" actionListener="#{appUserData.toggleDeleteModal}" icon="fa fa-remove" accesskey="o" update="@form" disabled="#{appUserData.selectedUserName eq null or appUserData.selectedUserName eq ''}">
<p:ajax event="dialogReturn" update="@form" />
</p:commandButton>
</p:column>
<!-- Modify User Button -->
<p:column>
<p:commandButton id="modifyAppUserBtn" value="#{msg.WEB_BUTTONS_OPEN}" style="margin-right: 2px;" actionListener="#{appUserData.toggleChangeModal}" icon="fa fa-edit" accesskey="o" update="@form" disabled="#{appUserData.selectedUserName eq null or appUserData.selectedUserName eq ''}">
<p:ajax event="dialogReturn" update="@form" />
</p:column>
</p:dataTable>
</h:form>
and my backend bean
@Override
public void toggleNewModal(ActionEvent event) {
RequestContext.getCurrentInstance().openDialog("/dialogs/new-dbuser");
}
@Override
public void toggleDeleteModal(ActionEvent event) {
RequestContext.getCurrentInstance().openDialog("/dialogs/del-report-dialog");
}
public void togglePasswordModal() {
RequestContext.getCurrentInstance().openDialog("/dialogs/modify-dbuser");
}
NOTE The new user button only fires this dialog(new-dbuser). The others buttons are firing nothing but they are clickable and I see no errors.
I do not know if it is important but my beans are configured as a request scope.
I know that this is very discussed topic in SO but I have not find out any solution that fits to me. Thank you for any help. I am really stuck in because I do not see any error. Please , be constructive.