Hi Marios,

Since the javadoc on the method does not indicate it is per request, I
assume it is for the whole lifecycle.

Checking the source code of Component that is indeed the case; The
component flags (which also store the flag FLAG_HAS_BEEN_RENDERED) are
never reset.

Met vriendelijke groet,
Kind regards,

Bas Gooren


Op 26 mrt. 2025 10:34:53 schreef mscoon <msc...@gmail.com>:

> Hi all,
>
> Does Component#hasBeenRendered return false only once per the entire
> lifecycle of the component or once per request?
>
> My use case is that I want to do some initializations in a MyComponent
> extends AbstractTextComponent but after resolveType() has been run, so I
> thought I'd do them in onBeforeRender() and check hasBeenRendered().
>
> Thanks in advance!
> Marios
>

Reply via email to