SHARE
TWEET

Controlador Dialogo

a guest Feb 14th, 2020 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sap.ui.define([
  2.     "sap/ui/base/ManagedObject",
  3.     "sap/m/MessageBox",
  4.     "sap/ui/core/routing/History"
  5. ], function (ManagedObject, MessageBox, History) {
  6.     "use strict";
  7.  
  8.     return ManagedObject.extend("com.zapata.vn.pp.Monitor.controller.DialogPropPag", {
  9.         constructor: function (oView) {
  10.             this._oView = oView;
  11.             this._oControl = sap.ui.xmlfragment(oView.getId(), "com.zapata.vn.pp.Monitor.view.DialogPropPag", this);
  12.             this._bInit = false;
  13.         },
  14.         exit: function () {
  15.             delete this._oView;
  16.         },
  17.         getView: function () {
  18.             return this._oView;
  19.         },
  20.         getControl: function () {
  21.             return this._oControl;
  22.         },
  23.         getOwnerComponent: function () {
  24.             return this._oView.getController().getOwnerComponent();
  25.         },
  26.         open: function () {
  27.             var oView = this._oView;
  28.             var oControl = this._oControl;
  29.             if (!this._bInit) {
  30.                 // Initialize our fragment
  31.                 this.onInit();
  32.                 this._bInit = true;
  33.                 // connect fragment to the root view of this component (models, lifecycle)
  34.                 oView.addDependent(oControl);
  35.             }
  36.             var args = Array.prototype.slice.call(arguments);
  37.             if (oControl.open) {
  38.                 oControl.open.apply(oControl, args);
  39.             } else if (oControl.openBy) {
  40.                 oControl.openBy.apply(oControl, args);
  41.             }
  42.         },
  43.         close: function () {
  44.             this._oControl.close();
  45.         },
  46.         setRouter: function (oRouter) {
  47.             this.oRouter = oRouter;
  48.         },
  49.         getBindingParameters: function () {
  50.             return {};
  51.         },
  52.         _onButtonPress: function () {
  53.             this.close();
  54.         },
  55.         _onButtonPress1: function () {
  56.             this.close();
  57.         },
  58.         onInit: function () {
  59.             this._oDialog = this.getControl();
  60.         },
  61.         onExit: function () {
  62.             this._oDialog.destroy();
  63.         }
  64.     });
  65. }, /* bExport= */ true);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top