src/sap.uxap/src/sap/uxap/component/ObjectPageLayoutUXDrivenFactory.controller.js
function (oModel) {

			var bHasPendingRequest = jQueryDOM.isEmptyObject(oModel.getData());

			//ensure a 1 way binding otherwise it cause any block property change to update the entire subSections
			oModel.setDefaultBindingMode(BindingMode.OneWay);

			var fnHeaderFactory = jQueryDOM.proxy(function () {

				if (bHasPendingRequest) {
					oModel.detachRequestCompleted(fnHeaderFactory);
				}

				var oHeaderTitleContext = new Context(oModel, "/headerTitle"),
					oObjectPageLayout = this.getView().byId("ObjectPageLayout");

				//create the header title if provided in the config
				if (oHeaderTitleContext.getProperty("")) {
					try {
						//retrieve the header class
						this._oHeader = this.controlFactory(oObjectPageLayout.getId(), oHeaderTitleContext);
						oObjectPageLayout.setHeaderTitle(this._oHeader);
					} catch (sError) {
						Log.error("ObjectPageLayoutFactory :: error in header creation from config: " + sError);
					}
				}

			}, this);

			//if data are not there yet, we wait for them
			if (bHasPendingRequest) {
				oModel.attachRequestCompleted(fnHeaderFactory);
			} else { //otherwise we apply the header factory immediately
				fnHeaderFactory();
			}
		}
function (oModel) {

			var bHasPendingRequest = jQueryDOM.isEmptyObject(oModel.getData());

			//ensure a 1 way binding otherwise it cause any block property change to update the entire subSections
			oModel.setDefaultBindingMode(BindingMode.OneWay);

			var fnHeaderFactory = jQueryDOM.proxy(function () {

				if (bHasPendingRequest) {
					oModel.detachRequestCompleted(fnHeaderFactory);
				}

				var oHeaderTitleContext = new Context(oModel, "/headerTitle"),
					oObjectPageLayout = this.getView().byId("ObjectPageLayout");

				//create the header title if provided in the config
				if (oHeaderTitleContext.getProperty("")) {
					try {
						//retrieve the header class
						this._oHeader = this.controlFactory(oObjectPageLayout.getId(), oHeaderTitleContext);
						oObjectPageLayout.setHeaderTitle(this._oHeader);
					} catch (sError) {
						Log.error("ObjectPageLayoutFactory :: error in header creation from config: " + sError);
					}
				}

			}, this);

			//if data are not there yet, we wait for them
			if (bHasPendingRequest) {
				oModel.attachRequestCompleted(fnHeaderFactory);
			} else { //otherwise we apply the header factory immediately
				fnHeaderFactory();
			}
		}
function ( oModel ) { var bHasPendingRequest = jQueryDOM . isEmptyObject ( oModel . getData ( ) ) ; //ensure a 1 way binding otherwise it cause any block property change to update the entire subSections oModel . setDefaultBindingMode ( BindingMode . OneWay ) ; var fnHeaderFactory = jQueryDOM . proxy ( function ( ) { if ( bHasPendingRequest ) { oModel . detachRequestCompleted ( fnHeaderFactory ) ; } var oHeaderTitleContext = new Context ( oModel , "/headerTitle" ) , oObjectPageLayout = this . getView ( ) . byId ( "ObjectPageLayout" ) ; //create the header title if provided in the config if ( oHeaderTitleContext . getProperty ( "" ) ) { try { //retrieve the header class this . _oHeader = this . controlFactory ( oObjectPageLayout . getId ( ) , oHeaderTitleContext ) ; oObjectPageLayout . setHeaderTitle ( this . _oHeader ) ; } catch ( sError ) { Log . error ( "ObjectPageLayoutFactory :: error in header creation from config: " + sError ) ; } } } , this ) ; //if data are not there yet, we wait for them if ( bHasPendingRequest ) { oModel . attachRequestCompleted ( fnHeaderFactory ) ; } else { //otherwise we apply the header factory immediately fnHeaderFactory ( ) ; } }
injects the header based on configuration
@param {object} oModel model instanse
injects the header based on configuration