28
Views
7
Comments
Solved
Screen Event Triggering Order In Case Of Webscreen and Block
Application Type
Mobile, Reactive

Hi All,

I just wanted to know the order in which the screen/block event will get triggered when we have added a web block in a web screen. I added log logic to see the order and this is what i got.

On Initialize (Screen)->On Ready (Screen)->On Initialize (Block)->On Ready (Block)->On Render (Screen)->On Render(Block)

Please let me know the correct order .

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

nope,

for a simple example of a block being on a screen unconditionally, it is

screen initialize > block initialize > block ready > block render > screen ready > screen render

each waiting for the previous handler to finish.

  • Not sure what mechanism you use to log, and how you determine that datetime
  • you'd need milliseconds to know for sure, or add a delay of at least 2 seconds to the event handlers

use console.log instead 

Dorine

2019-01-07 16-04-16
Siya
 
MVP

I agree with @Dorine Boudry . This is what I get 

I have used JS script to log the events - console.log(`[${new Date().toISOString()}]`, $parameters.In1);

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Siya ,

I could have pasted almost exactly the same screenprint :-)

A tip if you often use console log in Chrome to time stuff, you can leave out the first part of your log, and just ask the browser to give you the timestamp when things happen


2023-03-13 10-26-05
Sriyamini

Hi,

You can refer the document. Outsystems given the official document so you can know the correct flow for the screen and block lifecycle.

Thanks,

Sriyamini J

2022-02-07 08-52-30
Pranav Pandey

Hi Sriyamini,

I have referred this document before .It explains the event order for a particular screen or a web block. My question is for the order when we have added a web block within a screen. Which events will be triggered first, web block or web screen.

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

nope,

for a simple example of a block being on a screen unconditionally, it is

screen initialize > block initialize > block ready > block render > screen ready > screen render

each waiting for the previous handler to finish.

  • Not sure what mechanism you use to log, and how you determine that datetime
  • you'd need milliseconds to know for sure, or add a delay of at least 2 seconds to the event handlers

use console.log instead 

Dorine

2019-01-07 16-04-16
Siya
 
MVP

I agree with @Dorine Boudry . This is what I get 

I have used JS script to log the events - console.log(`[${new Date().toISOString()}]`, $parameters.In1);

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Siya ,

I could have pasted almost exactly the same screenprint :-)

A tip if you often use console log in Chrome to time stuff, you can leave out the first part of your log, and just ask the browser to give you the timestamp when things happen


2022-02-07 08-52-30
Pranav Pandey

Thanks Dorine Boudry & Siya , I got my answer

> screen initialize 

> block initialize 

> block ready 

> block render 

> screen ready 

> screen render 

> screen destroy 

> block destroy

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.