0 Replies Latest reply on Sep 29, 2010 11:12 AM by Mats Ekström

    rich:menuItem and window.confirm

    Mats Ekström Newbie

      Hi,

       

      I'm having problem to get this to work properly:

       

                                  <rich:menuItem
                                      onselect="if (!window.confirm('#{bundle.retransmitConfirm}') ) {return false}"
                                      value="#{bundle.common_resend}" status="tGeneralCancel"
                                      action="#{logBrowserCoAction.resendTrans(coGuiTO.transmissionId)}"
                                      reRender="transmissionTable" />

      <rich:menuItem

        onselect="if (!window.confirm('#{bundle.retransmitConfirm}') ) {return false}"

        value="#{bundle.common_resend}" status="tGeneralCancel"

        action="#{logBrowserCoAction.resendTrans(coGuiTO.transmissionId)}"

      reRender="transmissionTable" />

       

      The confirmation window gets triggered twice.. (so I have to press the OK button twice)

      Just for testing I also have tried without status and reRender, but with the same result.

      (I have used about the same code from a commandButton and it works just fine)

       

      We are using RichFaces 3.3.2.GA and jstl-1.2

       

      From the generated page:

       

      {\'onselect\':function(event){if (!window.confirm(\'Bekräfta omsändning.\') ) {return false}}}
      

       

      Thanks for any help.

       

      Message was edited by: Mats Ekström