Last active
February 7, 2017 08:47
-
-
Save cschuff/1649a9a9772caf280c66fe42ef7ffd8f to your computer and use it in GitHub Desktop.
Aggregation types not inherited from sap.ui.base.ManagedObject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor: function (sId, mSettings) { | |
// https://github.com/SAP/openui5/blob/master/src/sap.ui.core/src/sap/ui/base/ManagedObject.js#create | |
var oMyAggregation; | |
if ((sId && sId.myAggregation) || (mSettings && mSettings.myAggregation)) { | |
// delete from settings so that applySettings will not pick it up | |
if (sId && sId.myAggregation) { | |
oMyAggregation = sId.myAggregation; | |
delete sId.myAggregation; | |
} | |
if (mSettings && mSettings.myAggregation) { | |
oMyAggregation = mSettings.myAggregation; | |
delete mSettings.myAggregation; | |
} | |
} | |
// call parent constructor (that will call init and applySettings in this order) | |
ManagedObject.apply(this, arguments); | |
// set manually after applying settings | |
this.setMyAggregation(oMyAggregation); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment