Skip to Content
Author's profile photo Former Member

How may be found that error is fixed in OPENUI5

There was following code in function _updateTableContent, defined in file Table.js:


In this code Object $ with property rowSelector is returned by function getDomRefs, defined in file Row.js, and there is following block in this function:

if (d.rowSelector && d.rowSelector.length > 0) {
d.row = d.row.add(d.rowSelector);
} else {
d.rowSelector = undefined;

In this block property rowSelector is forcibly set as undefined, when (d.rowSelector && d.rowSelector.length > 0) is false.

But there may be the case, when d.rowSelector was not undefined and not an array, which length may be greater than 0, but the object, which has two own properties named “context” and “selector”.

And if this property may and is forcibly set to undefined (in Row.js), then it must be checked before calling some function of this property.

Because, if there is no such checks, then following error might and appeared in console:

Cannot read property ‘attr’ of undefined.

Therefore following code in file sap/ui/table/Table.js (without mentioned checks):


should be changed to following code (with mentioned checks):


This was the reason, why I asked community to show me the way, how this change can be done: Please, help to fix error in Table.js.

Chandrashekhar Mahajan kindly specified to me the following url, where is written how to report bug in OPENUI5:

where I found url for submitting issue in OPENUI5:

However, when I started to search the issue tracker to make sure the bug has not yet been reported:

then I have found out, that there is no definition of erroneous function _updateTableContent in the latest version of file Table.js

(b0e03a: @SebastianRied SebastianRied Merge “[FIX] sap.ui.table.Table: refreshRows getting called without b…)

Then I checked the version of this file, which was created a half-year ago – on Nov 24, 2015

(be2700a: @SebastianRied SebastianRied [FIX] sap.ui.table.Table: fixes display issue with MultiLabels and fi…)

and there in line 771 I found definition of erroneous function:

Table.prototype._updateTableContent = function() {

and in line 797 I found erroneous statement:

$rowDomRefs.rowSelector.attr("title", this._oResBundle.getText("TBL_ROW_SELECT"));

Then on more recent page of version list I checked the version, which was created on Feb 23, 2016

(abf2f5c: @SebastianRied SebastianRied [FEATURE] sap.ui.table: Performance improvements for table library)

and there again was no definition of erroneous function.

After further search between versions Nov 24, 2015 and Feb 23, 2016 following interesting facts were discovered:

1) in version, which was created Jan 28, 2016

(86fd37f: @SebastianRied SebastianRied Merge “[FIX] sap.ui.table.Table: fixes null-ref issue with rowSelecto…)

abovementioned change (for fixing error in Table.js) was already done (as it stated in title), however

2) in version, which was created on Feb 1

(80fa0f1: @SebastianRied SebastianRied [INTERNAL] sap.ui.table.Table: Revert Layout Thrashing Change)

this change was reverted, and at last

3) in the same version, which was already mentioned above and which was created on Feb 23, 2016

(abf2f5c: @SebastianRied SebastianRied [FEATURE] sap.ui.table: Performance improvements for table library)

block, where function attr of property rowSelector was called, was removed at all and thus error was fixed!

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.