cancel
Showing results for 
Search instead for 
Did you mean: 

Icon TabBar withTable

camichel
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

WouterLemaire
Active Contributor
0 Kudos

In case you are just starting, this example might be easier: https://sapui5.hana.ondemand.com/1.60.28/#/sample/sap.m.sample.IconTabBarNoIcons/code

You can use different tables of filter tables the same way the different texts are assigned to the different tabs.

If the table has to be the same for each tab but with a different filter, then you can add the table underneath the tab bar and use the selection as a filter.

Answers (0)