function (sId, oBindingContext) {
			var oBlockLayoutCell;
			if (!oBindingContext.getObject().categoryId) { // demo app tile
				if (oBindingContext.getObject().teaser) { // teaser cell (loads fragment from demo app)
					try {
						$.sap.registerResourcePath("test-resources","test-resources");
						var sRelativePath = $.sap.getResourcePath(oBindingContext.getObject().teaser);
						var oTeaser = sap.ui.xmlfragment(sId, sRelativePath);
						oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutTeaserCell", this);
						oBlockLayoutCell.getContent()[0].addContent(oTeaser);
						$.sap.registerResourcePath("test-resources",null);
					} catch (oException) {
						$.sap.log.warning("Teaser for demo app \"" + oBindingContext.getObject().name + "\" could not be loaded: " + oException);
						oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutCell", this);
					}
				} else { // normal cell
					oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutCell", this);
				}
			} else { // headline tile
				oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutHeadlineCell", this);
			}
			oBlockLayoutCell.setBindingContext(oBindingContext);

			return oBlockLayoutCell;
		}
function (sId, oBindingContext) {
			var oBlockLayoutCell;
			if (!oBindingContext.getObject().categoryId) { // demo app tile
				if (oBindingContext.getObject().teaser) { // teaser cell (loads fragment from demo app)
					try {
						$.sap.registerResourcePath("test-resources","test-resources");
						var sRelativePath = $.sap.getResourcePath(oBindingContext.getObject().teaser);
						var oTeaser = sap.ui.xmlfragment(sId, sRelativePath);
						oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutTeaserCell", this);
						oBlockLayoutCell.getContent()[0].addContent(oTeaser);
						$.sap.registerResourcePath("test-resources",null);
					} catch (oException) {
						$.sap.log.warning("Teaser for demo app \"" + oBindingContext.getObject().name + "\" could not be loaded: " + oException);
						oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutCell", this);
					}
				} else { // normal cell
					oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutCell", this);
				}
			} else { // headline tile
				oBlockLayoutCell = sap.ui.xmlfragment(sId, "sap.ui.demokit.demoapps.view.BlockLayoutHeadlineCell", this);
			}
			oBlockLayoutCell.setBindingContext(oBindingContext);

			return oBlockLayoutCell;
		}
function ( sId , oBindingContext ) { var oBlockLayoutCell ; if ( ! oBindingContext . getObject ( ) . categoryId ) { // demo app tile if ( oBindingContext . getObject ( ) . teaser ) { // teaser cell (loads fragment from demo app) try { $ . sap . registerResourcePath ( "test-resources" , "test-resources" ) ; var sRelativePath = $ . sap . getResourcePath ( oBindingContext . getObject ( ) . teaser ) ; var oTeaser = sap . ui . xmlfragment ( sId , sRelativePath ) ; oBlockLayoutCell = sap . ui . xmlfragment ( sId , "sap.ui.demokit.demoapps.view.BlockLayoutTeaserCell" , this ) ; oBlockLayoutCell . getContent ( ) [ 0 ] . addContent ( oTeaser ) ; $ . sap . registerResourcePath ( "test-resources" , null ) ; } catch ( oException ) { $ . sap . log . warning ( "Teaser for demo app \"" + oBindingContext . getObject ( ) . name + "\" could not be loaded: " + oException ) ; oBlockLayoutCell = sap . ui . xmlfragment ( sId , "sap.ui.demokit.demoapps.view.BlockLayoutCell" , this ) ; } } else { // normal cell oBlockLayoutCell = sap . ui . xmlfragment ( sId , "sap.ui.demokit.demoapps.view.BlockLayoutCell" , this ) ; } } else { // headline tile oBlockLayoutCell = sap . ui . xmlfragment ( sId , "sap.ui.demokit.demoapps.view.BlockLayoutHeadlineCell" , this ) ; } oBlockLayoutCell . setBindingContext ( oBindingContext ) ; return oBlockLayoutCell ; }
/* =========================================================== /* lifecycle methods /* =========================================================== 
Factory function for creating the demo app cells

@param {string} sId the id for the current cell
@param {sap.ui.model.Context} oBindingContext the context for the current cell
@return {sap.ui.layout.BlockLayoutCell} either a header cell or a demo app cell based on the metadata in the model
@public
/ * =========================================================== / * lifecycle methods / * =========================================================== Factory function for creating the demo app cells
Creates a cell for the given id.