The UI Toolkit renders every coach view on the page at load, but several controls defer the expensive part until it is needed - that is what "lazy loading" means in the toolkit:
- Tab Section: with lazy rendering enabled the tabs' content views are created when the tab is first activated; the CSHS data is already in the browser, only the DOM work is deferred. Switching back does not re-render.
- Collapsible Panel: content renders on first expand when configured; Modal Section: content renders when the modal is first shown.
- Table: only the current page's rows are rendered (pagination); cells that contain controls are created per visible row, which is why big tables should page.
- Visibility Hidden: a view whose visibility is Hidden is not rendered at all until it is made visible - use it for sections that may never be needed; when visibility changes to visible the view's load runs at that moment.
- Data: nothing is lazy - all of tw.local travels with the page; lazy data is your job (Service Call on demand, paged services).
// a heavy section hidden until requested: nothing rendered before
${Analytics}.setVisible(true); // now the child views load (their "load" handlers run), charts are built once
${Details}.setVisible(false, true); // second argument on newer toolkits: collapse without destroying (keeps state)Custom coach views can follow the same pattern (question 2527) by rendering in view (when shown) rather than load, or by observing visibility.
References