Skip to Content
0
Aug 11, 2023 at 07:46 AM

SAPUI5 Binding Context Path is Zero upon clicking a previously clicked row in flexible column layout

49 Views Last edit Aug 11, 2023 at 07:52 AM 2 rev

Hi everyone,

I have developed a flexible column layout app. It works well except when I click on a row to navigate to second column and the page is refreshed, clicking the row same row again returns zero in the context path, e.g UnitSet(0) instead of UnitSet(709342).

screenshot-correct.png

When I click TECHNOLOGY the first time, the second column loads correctly with binding context well captured. If I refresh the page when second column is open and then click on TECHNOLOGY again, the binding context appears to be 'lost' and no data is displayed on the second column. See below

screenshot-wrong.png

Below is the navigation code that I am using:

<code>unitEmployees: function (oEvent) {
var taskPath = oEvent.getSource().getBindingContext("odata").getPath(),
                task = taskPath.split("/").slice(-1).pop(),
                oNextUIState;
                    this.getOwnerComponent().getHelper().then(function (oHelper) {
                oNextUIState = oHelper.getNextUIState(1);
                this.oRouter.navTo("unitemployees", {
                    layout: fioriLibrary.LayoutType.TwoColumnsMidExpanded,
                    task: task
                });
            }.bind(this));
}

What could be the issue? My expectation is that if I click TECHNOLOGY after page reload, the path should not be UnitSet(0). Clicking INFRASTRUCTURE works perfectly as long as its first time before page reload.

Regards,

Attachments