Skip to Content

Sapui5 onAfterRendering is called twice then navigating to a page

May 19, 2017 at 02:23 PM


avatar image
Former Member

I noticed that in a view controller onAfterRendering method is called twice then I navigate to a page from another one by this.getRouter().getTargets().display("home", dataObject);

But if I open the page using hash(#home) in url it's called as expected only once.

Is it the way It's supposed to be or I have some code in controller that couses it?


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Apr 19 at 11:43 AM

Common mistake i do :)

1.While copying view i forget to remove controller in my View.xml
2.Use attachRouteMatched instead of attachRoutePatternMatched

Hope you would already have solved but might others in same situation

10 |10000 characters needed characters left characters exceeded