Skip to Content
0

Calling Controller method once view is rendered

Jul 18, 2017 at 05:01 AM

25

avatar image
Former Member

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

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

1 Answer

Sharath M G Jul 18, 2017 at 07:38 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded