Skip to Content
avatar image
Former Member

Calling Controller method once view is rendered

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 18, 2017 at 07:38 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded