src/sap.m/src/sap/m/ViewSettingsDialog.js
function restoreCustomTabContentAggregation(sAggregationName, oCustomTab) {
		// Make sure page1 exists, as this method may be called on destroy(), after the page was destroyed
		// Suppress creation of new page as the following logic is needed only when a page already exists
		if (!this._getPage1(true)) {
			return;
		}

		// only the 'customTabs' aggregation is manipulated with shenanigans
		if (sAggregationName === 'customTabs' && oCustomTab) {
			/* oCustomTab must be an instance of the "customTab" aggregation type and must be the last opened page */
			if (oCustomTab.getMetadata().getName() === this.getMetadata().getManagedAggregation(sAggregationName).type &&
				this._vContentPage === oCustomTab.getId()) {
				/* the iContentPage property corresponds to the custom tab id - set the custom tab content aggregation
				 back to the custom tab instance */
				var oPage1Content = this._getPage1().getContent();
				oPage1Content.forEach(function (oContent) {
					oCustomTab.addAggregation('content', oContent, true);
				});
			}
		} else if (!sAggregationName && !oCustomTab) {
			/* when these parameters are missing, cycle through all custom tabs and detect if any needs manipulation */
			var oPage1Content = this._getPage1().getContent();
			/* the vContentPage property corresponds to a custom tab id - set the  custom tab content aggregation back
			 to the corresponding custom tab instance, so it can be reused later */
			this.getCustomTabs().forEach(function (oCustomTab) {
				if (this._vContentPage === oCustomTab.getId()) {
					oPage1Content.forEach(function (oContent) {
						oCustomTab.addAggregation('content', oContent, true);
					});
				}
			}, this);
		}

	}
function restoreCustomTabContentAggregation(sAggregationName, oCustomTab) {
		// Make sure page1 exists, as this method may be called on destroy(), after the page was destroyed
		// Suppress creation of new page as the following logic is needed only when a page already exists
		if (!this._getPage1(true)) {
			return;
		}

		// only the 'customTabs' aggregation is manipulated with shenanigans
		if (sAggregationName === 'customTabs' && oCustomTab) {
			/* oCustomTab must be an instance of the "customTab" aggregation type and must be the last opened page */
			if (oCustomTab.getMetadata().getName() === this.getMetadata().getManagedAggregation(sAggregationName).type &&
				this._vContentPage === oCustomTab.getId()) {
				/* the iContentPage property corresponds to the custom tab id - set the custom tab content aggregation
				 back to the custom tab instance */
				var oPage1Content = this._getPage1().getContent();
				oPage1Content.forEach(function (oContent) {
					oCustomTab.addAggregation('content', oContent, true);
				});
			}
		} else if (!sAggregationName && !oCustomTab) {
			/* when these parameters are missing, cycle through all custom tabs and detect if any needs manipulation */
			var oPage1Content = this._getPage1().getContent();
			/* the vContentPage property corresponds to a custom tab id - set the  custom tab content aggregation back
			 to the corresponding custom tab instance, so it can be reused later */
			this.getCustomTabs().forEach(function (oCustomTab) {
				if (this._vContentPage === oCustomTab.getId()) {
					oPage1Content.forEach(function (oContent) {
						oCustomTab.addAggregation('content', oContent, true);
					});
				}
			}, this);
		}

	}
function restoreCustomTabContentAggregation ( sAggregationName , oCustomTab ) { // Make sure page1 exists, as this method may be called on destroy(), after the page was destroyed // Suppress creation of new page as the following logic is needed only when a page already exists if ( ! this . _getPage1 ( true ) ) { return ; } // only the 'customTabs' aggregation is manipulated with shenanigans if ( sAggregationName === 'customTabs' && oCustomTab ) { /* oCustomTab must be an instance of the "customTab" aggregation type and must be the last opened page */ if ( oCustomTab . getMetadata ( ) . getName ( ) === this . getMetadata ( ) . getManagedAggregation ( sAggregationName ) . type && this . _vContentPage === oCustomTab . getId ( ) ) { /* the iContentPage property corresponds to the custom tab id - set the custom tab content aggregation
				 back to the custom tab instance */ var oPage1Content = this . _getPage1 ( ) . getContent ( ) ; oPage1Content . forEach ( function ( oContent ) { oCustomTab . addAggregation ( 'content' , oContent , true ) ; } ) ; } } else if ( ! sAggregationName && ! oCustomTab ) { /* when these parameters are missing, cycle through all custom tabs and detect if any needs manipulation */ var oPage1Content = this . _getPage1 ( ) . getContent ( ) ; /* the vContentPage property corresponds to a custom tab id - set the  custom tab content aggregation back
			 to the corresponding custom tab instance, so it can be reused later */ this . getCustomTabs ( ) . forEach ( function ( oCustomTab ) { if ( this . _vContentPage === oCustomTab . getId ( ) ) { oPage1Content . forEach ( function ( oContent ) { oCustomTab . addAggregation ( 'content' , oContent , true ) ; } ) ; } } , this ) ; } }
Handle the "content" aggregation of a custom tab, as the items in it might be transferred to the dialog page
instance.
@param {string} sAggregationName The string identifying the aggregation that the given object should be removed from
@param {object} oCustomTab Custom tab instance
@private
Handle the content aggregation of a custom tab as the items in it might be transferred to the dialog page instance .