function findControlClass(sNamespaceURI, sLocalName) {
			var sClassName;
			var mLibraries = sap.ui.getCore().getLoadedLibraries();
			jQuery.each(mLibraries, function(sLibName, oLibrary) {
				if ( sNamespaceURI === oLibrary.namespace || sNamespaceURI === oLibrary.name ) {
					sClassName = oLibrary.name + "." + ((oLibrary.tagNames && oLibrary.tagNames[sLocalName]) || sLocalName);
				}
			});
			// TODO guess library from sNamespaceURI and load corresponding lib!?
			sClassName = sClassName || sNamespaceURI + "." + sLocalName;

			// ensure that control and library are loaded
			function getObjectFallback(oClassObject) {
				// some modules might not return a class definition, so we fallback to the global
				// this is against the AMD definition, but is required for backward compatibility
				if (!oClassObject) {
					Log.error("Control '" + sClassName + "' did not return a class definition from sap.ui.define.", "", "XMLTemplateProcessor");
					oClassObject = ObjectPath.get(sClassName);
				}
				if (!oClassObject) {
					Log.error("Can't find object class '" + sClassName + "' for XML-view", "", "XMLTemplateProcessor");
				}
				return oClassObject;
			}

			var sResourceName = sClassName.replace(/\./g, "/");
			var oClassObject = sap.ui.require(sResourceName);
			if (!oClassObject) {
				if (bAsync) {
					return new Promise(function(resolve, reject) {
						sap.ui.require([sResourceName], function(oClassObject) {
							oClassObject = getObjectFallback(oClassObject);
							resolve(oClassObject);
						}, reject);
					});
				} else {
					oClassObject = sap.ui.requireSync(sResourceName); // legacy-relevant: Sync path
					oClassObject = getObjectFallback(oClassObject);
				}
			}
			return oClassObject;
		}
/**
		 * Requests the control class if not loaded yet.
		 * If the View is set to async=true, an async XHR is sent, otherwise a sync XHR.
		 *
		 * @param {string} sNamespaceURI
		 * @param {string} sLocalName
		 * @returns {function|Promise|undefined} the loaded ControlClass plain or resolved from a Promise
		 */
Requests the control class if not loaded yet.
If the View is set to async=true, an async XHR is sent, otherwise a sync XHR.

@param {string} sNamespaceURI
@param {string} sLocalName
@returns {function|Promise|undefined} the loaded ControlClass plain or resolved from a Promise
Requests the control class if not loaded yet . If the View is set to async = true an async XHR is sent otherwise a sync XHR . @param { string } sNamespaceURI @param { string } sLocalName @returns { function|Promise|undefined } the loaded ControlClass plain or resolved from a Promise
function findControlClass(sNamespaceURI, sLocalName) {
			var sClassName;
			var mLibraries = sap.ui.getCore().getLoadedLibraries();
			jQuery.each(mLibraries, function(sLibName, oLibrary) {
				if ( sNamespaceURI === oLibrary.namespace || sNamespaceURI === oLibrary.name ) {
					sClassName = oLibrary.name + "." + ((oLibrary.tagNames && oLibrary.tagNames[sLocalName]) || sLocalName);
				}
			});
			sClassName = sClassName || sNamespaceURI + "." + sLocalName;
			function getObjectFallback(oClassObject) {
				if (!oClassObject) {
					Log.error("Control '" + sClassName + "' did not return a class definition from sap.ui.define.", "", "XMLTemplateProcessor");
					oClassObject = ObjectPath.get(sClassName);
				}
				if (!oClassObject) {
					Log.error("Can't find object class '" + sClassName + "' for XML-view", "", "XMLTemplateProcessor");
				}
				return oClassObject;
			}
			var sResourceName = sClassName.replace(/\./g, "/");
			var oClassObject = sap.ui.require(sResourceName);
			if (!oClassObject) {
				if (bAsync) {
					return new Promise(function(resolve, reject) {
						sap.ui.require([sResourceName], function(oClassObject) {
							oClassObject = getObjectFallback(oClassObject);
							resolve(oClassObject);
						}, reject);
					});
				} else {
					oClassObject = sap.ui.requireSync(sResourceName); 
					oClassObject = getObjectFallback(oClassObject);
				}
			}
			return oClassObject;
		}
function findControlClass ( sNamespaceURI , sLocalName ) { var sClassName ; var mLibraries = sap . ui . getCore ( ) . getLoadedLibraries ( ) ; jQuery . each ( mLibraries , function ( sLibName , oLibrary ) { if ( sNamespaceURI === oLibrary . namespace || sNamespaceURI === oLibrary . name ) { sClassName = oLibrary . name + "." + ( ( oLibrary . tagNames && oLibrary . tagNames [ sLocalName ] ) || sLocalName ) ; } } ) ; sClassName = sClassName || sNamespaceURI + "." + sLocalName ; function getObjectFallback ( oClassObject ) { if ( ! oClassObject ) { Log . error ( "Control '" + sClassName + "' did not return a class definition from sap.ui.define." , "" , "XMLTemplateProcessor" ) ; oClassObject = ObjectPath . get ( sClassName ) ; } if ( ! oClassObject ) { Log . error ( "Can't find object class '" + sClassName + "' for XML-view" , "" , "XMLTemplateProcessor" ) ; } return oClassObject ; } var sResourceName = sClassName . replace ( / \. / g , "/" ) ; var oClassObject = sap . ui . require ( sResourceName ) ; if ( ! oClassObject ) { if ( bAsync ) { return new Promise ( function ( resolve , reject ) { sap . ui . require ( [ sResourceName ] , function ( oClassObject ) { oClassObject = getObjectFallback ( oClassObject ) ; resolve ( oClassObject ) ; } , reject ) ; } ) ; } else { oClassObject = sap . ui . requireSync ( sResourceName ) ; oClassObject = getObjectFallback ( oClassObject ) ; } } return oClassObject ; }
Requests the control class if not loaded yet.
Requests the control class if not loaded yet .
// TODO guess library from sNamespaceURI and load corresponding lib!? // ensure that control and library are loaded // some modules might not return a class definition, so we fallback to the global // this is against the AMD definition, but is required for backward compatibility // legacy-relevant: Sync path