cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with binding while routing

jklimes
Explorer

Hello everyone,

I have a problem with binding and routing. When I navigate to detailPage I use on patternMatch and bindElement to bind detail view. But when I navigate Back and go to another detail (Diff binding Path) I first see old data till the new datas are loaded. Is there any solution to this problem? Is UI5 able to use something as placeholder or am I doing something wrong with binding the detail page?

Thank you!

View Entire Topic
sonalika_porwal
Participant
0 Kudos

You can try setting your binding context as null or undefined in onBeforeRendering as mentioned in the following code example. This will clear the data when you navigate back to the master page. It might display a blank screen for the time until your data is loaded. Busy indicators can be used in that case.

onBeforeRendering(){
 this.getView().unbindElement();
 this.getView().setBindingContext(null);
}