Namespace sap.ca.ui.dialog.confirmationModule: sap/ca/ui/dialog/factory


Provides methods to show a confirmation dialog in the Fiori style.

sap.ca.ui.dialog.confirmation is a static class, the statement jQuery.sap.require("sap.ca.ui.dialog.factory") needs to be called before the function can be used. Example:

   jQuery.sap.require("sap.ca.ui.dialog.factory");
   
   // provide your callback function, so that you can get informed if the enduser confirms or cancels the dialog
   var fnClose = function(oResult) {
       if (oResult) {
           console.log("isConfirmed:" + oResult.isConfirmed);
           if (oResult.sNote) {
               console.log(oResult.sNote);
           }
       }
   }
   
   //open the confirmation dialog
   sap.ca.ui.dialog.confirmation.open({
       question : "Send your decision on the shopping card submitted by Henry Emerald?",
       showNote : true,
       title : "Send",
       confirmButtonLabel : "Send"
   }, fnClose);

Deprecated API:This control is deprecated since 1.26 as per central UX requirements. Please use sap.m.Dialog instead.

Method Summary
open(oSettings?, fnClose?)Opens the confirmation dialog
Method Detail
open(oSettings?, fnClose?)
Opens the confirmation dialog
Parameters:
{object}oSettings? settings for the confirmation dialog

The supported settings are:

additionalInformation : {array} optional, up-to 4 lines can be shown, every line has the structure: {label: "Leave Type", text: "Vacation"}

confirmButtonLabel {string} text for the confirm button

noteMandatory :{boolean} optional, default false

question : {string} the question/action which the user needs to confirm

showNote : {boolean} default true

title : {string} title of the dialog

{function}fnClose? the function will be called if the confirmation dialog is closed.

there are 2 default values can be retrieved:

isConfirmed : {boolean} true if the user confirms the action; false if the user cancels the dialog

sNote : {string} the note text provided by the user