cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Element- List report auto populate rows.

0 Kudos

I have designed a simple Fiori Element - Fiori App with Search Enabled List Report and object page.

The list records are really small and i want the records to be auto populated on very first time while launching the app.

I don't want to click the "Go" button to populate the values first time.

I found some answers where in the web ide- i changed the property enableAutoBinding: true of the smart table but still it is not working.

View Entire Topic
prajnaparmita
Employee
Employee
0 Kudos

Hello Siva ,

Below piece of code worked for me,

Best Regards

Prajna

onInit: function () {	
		      var oModel = this.getOwnerComponent().getModel();
		      this.getView().setModel(oModel);
		      var oSmartTable = this.getView().byId("listReport");
		var oSmartFilterBar = this.getView().byId("listReportFilter");
				//For live mode
			var liveMode = oSmartFilterBar.getLiveMode();
			if (!liveMode) {
				oSmartFilterBar.setLiveMode(true);
			}
				oModel.getMetaModel().loaded().then(function () {
				oSmartTable.rebindTable();
			});
		},

0 Kudos

My Project structure and the output looks like as shown above.

Where exactly can i put the onInit function. Its a fiori element based list report and the things are controlled from the CDS view annotations.

Appreciate your help.

Thanks.