0

すべて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}" /> 
4

0 に答える 0