12 Replies Latest reply on May 15, 2009 1:46 PM by Jay Haley

    modalPanel as confirm dialog

    Robert Stone Newbie

      I need to display delete confirmation pop-up when user clicks "Delete" button. I would like to use modalPanel for that purpose but I even stuck with regular JS prompt. Here's what I'm trying and it's not working

      <a4j:commandButton id="deleteDevice" value="Delete Device" rendered="false"
       oncomplete="if(!window.confirm('Are you sure?'){return false}"
       actionListener="#{deviceMasterFormBean.deleteDevice}" reRender="deviceTabs,updateControls"/>

      Basically I need to display confirmation and if user confirms to arrive to my actionListener method. Can someone share a quick example?