Skip to Content
2
Apr 23, 2020 at 11:14 AM

OnBeforeRendering and OnAfterRendering in SAP UI5

874 Views

Hi,

I am having some doubts in Life cycle methods in SAP UI5 especially when understanding onBeforeRendering and onAfterRendering methods. What I understood was onBeforeRedering will be triggered before the view is rendered and onAfterRendering method is triggered after a view is rendered. I understood the use of OnAfterRendering but not onbeforRendering.

1) Could you please give me a test case where onBeforeRendering is used exactly.

2) I have a Split App, where I had kept some console.log() statements in onBeforeRendering and onAfterRendering methods. When I ran the app, both methods triggered only one time. When I navigate in the same app, these methods are not triggered again. Why so?

Regards

Karthik S