Hello,

I didn't quite understand this concept: "Although Web Blocks can be used within other Web Blocks, they cannot be used within themselves".

If they can be used within other web blocks, how can they not be used in them?

Solution

Hi Karina,


what it means is that the OS platform won't allow recursion.


So webblock A can have inside of it webblock B, and this one can inside have webblock C and so on...

But at no point can webblock A have webblock A inside of it.  So obviously not directly, but if you think about outsmarting Outsystems, think again, even several levels deep you can't add webblock A inside itself.


Hope this helps,

Dorine

Solution

Karina Ferreira wrote:

"Although Web Blocks can be used within other Web Blocks, they cannot be used within themselves".

If they can be used within other web blocks, how can they not be used in them?

Hi Karina,

By using the same webblock within themselves, it will create a loop/cycle calls to the same web block and thus outsystems does not allow to use.


Kind Regard's,

LK


Hi Karina,

In order to better understand what is explained already in the above posts, here are the docs around this subject.

Regards,

Nordin

Dorine Boudry wrote:

Hi Karina,


what it means is that the OS platform won't allow recursion.


So webblock A can have inside of it webblock B, and this one can inside have webblock C and so on...

But at no point can webblock A have webblock A inside of it.  So obviously not directly, but if you think about outsmarting Outsystems, think again, even several levels deep you can't add webblock A inside itself.


Hope this helps,

Dorine


thank you for your answer. It would then be the opposite of the Container widgets that we can place inside itself. Correct?

Karina Ferreira wrote:

Dorine Boudry wrote:

Hi Karina,


what it means is that the OS platform won't allow recursion.


So webblock A can have inside of it webblock B, and this one can inside have webblock C and so on...

But at no point can webblock A have webblock A inside of it.  So obviously not directly, but if you think about outsmarting Outsystems, think again, even several levels deep you can't add webblock A inside itself.


Hope this helps,

Dorine


thank you for your answer. It would then be the opposite of the Container widgets that we can place inside itself. Correct?

Hi Karina,

Container inside container is a different case. They will not make a loop as we can add container inside container only at design time only while web block will have itself in it and make infinite loop at runtime.

Container can be compared compared with a web block having a placeholder in it. This way you can place a web block in itself (inside its placeholder actually). OutSystems will not show error in this case as it will not loat in a infinite loop at runtime because we have added it on design time.