cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Controller method once view is rendered

Former Member
0 Kudos

Hi All,

I would like to call a method in the controller once my view is rendered completely. Is there a way where i can call the custom method once the view is rendered, that is DOM is fully rendered. I have tried onAfterRendering but it is called only once. Please let me know if you have any solution.

Thanks and Regards,
Saravanan

Accepted Solutions (0)

Answers (1)

Answers (1)

Sharathmg
Active Contributor
0 Kudos

The Hook methods, onBeforeRendering and onAfterRendering, gets triggered after every rendering of the page. Not sure, when you say, ".. it gets called only once".

The SAPUI5 rendering is intelligent in a sense that it groups the queued renderings. Therefore you should never call directly but instead use invalidate to mark a control for rerendering.