cancel
Showing results for 
Search instead for 
Did you mean: 

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

gichuhimd
Explorer
0 Kudos
204

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).

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

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,

View Entire Topic
AlexNecula
Active Contributor
0 Kudos

When refreshing the page, the context should be loaded automatically for the respective entry, without you needing to click on TECHNOLOGY again. Please make sure that in the controller of the detail page you bind correctly the path from the URL.