title: Dynamically Set onExecute callback function in DOJO Confirm Dialog
body: <p>I have two html buttons in my jsp. One is Add and another is Remove.
  Now If ony of the button is clicked then one dojo confirm dialog would be displayed. On click of 'Ok' in the dialog either Add or Remove Functionality will be executed. And this Dojo Dialog in present in one of the parent jsp page which will be reused by other jsp pages where Add or Remove functionlity is present. Depening on the Add/Remove button click the confirm message also needs to be changed. Ex. for Add, the message should be 'Do you want to Add' , for Remove the message would be 'Do you want to Remove'. I am able to set the message dynamically in the DOJO Cinfirm Dialog but not able to set the onExecute callback function ie. when Ok will be clicked in teh Dialog. Below id the code.</p>
  
  <p><strong>NB: I am using DOJO 1.10 library</strong></p>
  
  <p>Confirm Dialog Code:</p>
  
  <pre><code>require(["dijit/ConfirmDialog", "dojo/domReady!"], function(ConfirmDialog){
      myDialog = new ConfirmDialog({
          title: "GCLDW - Confirm Dialog",
          content: "",
          style: "width: 300px;",
          onExecute:function(){
              removeCustomer();
          }
      });
  });
  </code></pre>
  
  <p>HTML Button Code:</p>
  
  <pre><code>&lt;button type="button" id="removeCustomerButton"
          onclick="myDialog.set('content', 'Do you want to remove the selected item ?&lt;br&gt;&lt;br&gt;');myDialog.show();"&gt;
                                  &lt;SPAN class=grey&gt;&lt;EM&gt;&lt;s:message
                                      code="customer.removeCustomer" text="" /&gt;&lt;/EM&gt;
                                  &lt;/SPAN&gt;
  &lt;/button&gt;
  
  &lt;button type="button" id="addCustomerButton"
          onclick="myDialog.set('content', 'Do you want to Add the selected item ?&lt;br&gt;&lt;br&gt;');myDialog.show();"&gt;
                                  &lt;SPAN class=grey&gt;&lt;EM&gt;&lt;s:message
                                      code="customer.addCustomer" text=""/&gt;&lt;/EM&gt;
                                  &lt;/SPAN&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>Now how to set the onExecute call back function depending on the button click, either it would be addCustomer() or removeCustomer() , and whichever page is using this dialog will have their own implementation of these two method. </p>