すべてdatatable
の行にチェックボックスがありcommandButton
、一番下に があります。ユーザーが行を選択せずに をクリックするcommandButton
と、エラー メッセージが表示されます。
ここでの私の問題は次のとおりです。ユーザーが何も選択せずにcommandButton
(初めて)クリックすると、が表示されh:message
ます。
その後、commandButton
もう一度クリックすると、アクション メソッドdisplayStruct
は呼び出されません。ユーザーが行を選択してクリックするcommandButton
と、機能します。
次回、行を選択しないと、エラー メッセージが表示されます (再び)。その後、彼が行を選択すると、(再び) 機能します。
したがって、ユーザーが最初に行を選択しない場合、その後は何回もcommandButton
呼び出されません.#
これが私のコードです
<p:commandButton
value="Compare"
action="#{historyOrgStructController.displayStruct}"
update=":form" oncomplete="orgStructDialog.show()"
title="View Detail" />
<p:dialog
id="dialog"
header="History on the selected Dates"
widgetVar="orgStructDialog"
showEffect="slide"
hideEffect="slide"
rendered="#{historyOrgStructController.flag}" />