Multiple choice technology web technology

You need to reposition the children of a container when loadin the application based on some custom logic. Which is the correct place to trigger the logic?

  1. preinitialize of the Container

  2. initialize of the container

  3. creationComplete of the child Components of the container

  4. creationComplete of the Container

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The creationComplete event of the container is the correct place to trigger logic that repositions children because it fires after all children have been created and laid out. Using preinitialize or initialize would be too early; the children may not exist yet. Using creationComplete on individual children would require attaching logic to each child separately rather than handling it centrally at the container level.