この問題は、新しいウィンドウでダイアログを開くcommandButtonの数が多い最小2画面/ビューで直面しています。私はPrimefaces 5.3.5とJSF Mojarra 2.2.8を使用しています。これらのactions/actionListenersは、ポップアップウィンドウで新しいダイアログを開きます。最初のcommandButtonは常に新しいダイアログを開きますが、他のcommandButtonは何もしません。PFコマンドボタン(CB)アクション/ actionListenerは、dataTableの3番目のCBをクリックすると呼び出されません。
<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>
と私のバックエンド豆
@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新しいユーザーボタンは、このダイアログ(新しい-DBUSER)を発生させます。他のボタンは何も発射していませんが、クリック可能でエラーは表示されません。
重要であるかどうかわかりませんが、豆はリクエストスコープとして設定されています。
私はこれが非常に議論されていることを知っていますが、私に合った解決策は何も見つかりません。何か助けてくれてありがとう。私はどんな誤りも見ないので、本当に立ち往生しています。建設的にしてください。
_「これは非常に議論されていることはわかっていますが、私に合った解決策は見つけられていません」_ [ask]を参照してください。あなたが見つけたものと、それがうまくいかなかった理由を投稿してください。そして、[mcve] – Kukeltje
@Kukeltjeを投稿していただきありがとうございます。今見て、新しいユーザーボタンがダイアログを起動するだけであることに注意してください。 – user321
他にどのような問題がありますか?そして彼らはあなたのために何を解決しなかったのですか?それは私が意味していたものです。注文を変更しようとしましたか?その後何が起こるのですか? – Kukeltje