Skip to Content
avatar image
Former Member

Sapui5 onAfterRendering is called twice then navigating to a page

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?

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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

    Add comment
    10|10000 characters needed characters exceeded