cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Empty path in items of the table

nitesh_bisht
Product and Topic Expert
Product and Topic Expert
0 Kudos
320

Hi all,

I'm binding the items of a table from the controller, but on doing this I'm getting an extra empty row in the table.

Then I found some references where they define an empty path in the items of the table like this and then as usual bind the data through the controller:

This way I don't get an extra empty row in the table.

Could someone please explain this behavior? And I've seen at many places where they define an empty path like above, what is the purpose of doing this?

View Entire Topic
abhishek_singh26
Explorer
0 Kudos

SAPUI5 tries to render the aggregation even if it doesn't have a clear template or binding context. When nothing is bound yet, it still reserves space for one row, leading to an unexpected empty row.

The empty items="" (or items="{ }") in XML view prevents the table from rendering a row before binding is done.

Always define the aggregation structure explicitly when binding from controller code.

This is a common best practice when binding tables dynamically in SAPUI5.

Hope this clears up the behavior!

Best regards,
Abhishek Singh
SAP Fiori | UI5 Developer & Integration Specialist