Skip to Content
0
Jul 27, 2020 at 11:03 AM

Icon TabBar withTable

71 Views Last edit Jul 27, 2020 at 11:52 AM 2 rev

Hello guys,

I am kind a new in SAP UI5 Development...I wanted to use the Icon TabBar Sample from the SDK...

https://sapui5.hana.ondemand.com/#/entity/sap.m.IconTabBar/sample/sap.m.sample.IconTabBar

It is not working for me cause they reuse a table component...

onInit: function () {


	// set explored app's demo model on this sample
        var oModel = new JSONModel(sap.ui.require.toUrl("sap/ui/demo/mock/products.json"));
	this.getView().setModel(oModel);


	// reuse table sample component
	var oComp = sap.ui.getCore().createComponent({
		name : 'sap.m.sample.Table'
	        });
	oComp.setModel(this.getView().getModel());
	this._oTable = oComp.getTable();
	this.byId("idIconTabBar").insertContent(this._oTable);


	// update table
	this._oTable.setHeaderText(null);
	this._oTable.setShowSeparators("Inner");

I am not sure how to create that kind of reusable table...as a component!? How do I create such table comonent to use it in different views for example!?

Can anyone help me how to adapt this to my case? I want three filters "OK, "ALERTS" & "ALL".. and wanted to use one table and not tree tables...

Thanks in Advanced