Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sap.ui.define([
- "sap/ui/base/ManagedObject",
- "sap/m/MessageBox",
- "sap/ui/core/routing/History"
- ], function (ManagedObject, MessageBox, History) {
- "use strict";
- return ManagedObject.extend("com.zapata.vn.pp.Monitor.controller.DialogPropPag", {
- constructor: function (oView) {
- this._oView = oView;
- this._oControl = sap.ui.xmlfragment(oView.getId(), "com.zapata.vn.pp.Monitor.view.DialogPropPag", this);
- this._bInit = false;
- },
- exit: function () {
- delete this._oView;
- },
- getView: function () {
- return this._oView;
- },
- getControl: function () {
- return this._oControl;
- },
- getOwnerComponent: function () {
- return this._oView.getController().getOwnerComponent();
- },
- open: function () {
- var oView = this._oView;
- var oControl = this._oControl;
- if (!this._bInit) {
- // Initialize our fragment
- this.onInit();
- this._bInit = true;
- // connect fragment to the root view of this component (models, lifecycle)
- oView.addDependent(oControl);
- }
- var args = Array.prototype.slice.call(arguments);
- if (oControl.open) {
- oControl.open.apply(oControl, args);
- } else if (oControl.openBy) {
- oControl.openBy.apply(oControl, args);
- }
- },
- close: function () {
- this._oControl.close();
- },
- setRouter: function (oRouter) {
- this.oRouter = oRouter;
- },
- getBindingParameters: function () {
- return {};
- },
- _onButtonPress: function () {
- this.close();
- },
- _onButtonPress1: function () {
- this.close();
- },
- onInit: function () {
- this._oDialog = this.getControl();
- },
- onExit: function () {
- this._oDialog.destroy();
- }
- });
- }, /* bExport= */ true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement