Item window is a typical way to display item data, this article is to investigate the render process of it. And then, check the trigger timing of "onFormPopulated" and "onLoad".
When user open an item, Window Render Process (see Figure 1) will be executed. There is an action "render" which mainly handles form details (see Figure 2), here calls Form Render Process.
When HTML elements are loaded, system will trigger form event "onFormPopulated" if it exists.
After Form Render Process finished, system will trigger form event "onLoad" if it exists, and then Window Render Process is finished.
But if user save/lock/unlock an item, system will only execute Form Render Process.
With above points, the trigger timing and main difference between "onFormPopulated" and "onLoad" are clear:
When user open an item, Window Render Process (see Figure 1) will be executed. There is an action "render" which mainly handles form details (see Figure 2), here calls Form Render Process.
When HTML elements are loaded, system will trigger form event "onFormPopulated" if it exists.
After Form Render Process finished, system will trigger form event "onLoad" if it exists, and then Window Render Process is finished.
But if user save/lock/unlock an item, system will only execute Form Render Process.
With above points, the trigger timing and main difference between "onFormPopulated" and "onLoad" are clear:
- onFormPopulated: execute every time while item window update form data.
- onLoad: execute only one time while item window opened.
Figure 1. Window Render Process |
Figure 2. Form Render Process |
Helpful and well explained, thanks!
ReplyDelete