Some components have the ability to enclose text and other components that will render as dictated by the enclosing component. The enclosing component determines if, when and how often the enclosed text and components are rendered. The enclosed part is the body of the enclosing component. Whether a component is allowed to have a body is specified in the component specification. When not allowed, the component simply ignores the enclosed body.
Enclosed components are not to be confused with embedded components. Enclosed components still execute within the context of their containing component even though their rendering is controlled by their enclosing component.
... <span jwcid="list@Foreach" ... > |
| Foreach is an enclosing component. The body of the Foreach component is the text and components enclosed by the Foreach's placeholder tag. | ||||
| This is static text enclosed by the Foreach component and will be rendered unaltered for each iteration of the loop. | ||||
| The Insert component here is enclosed by the Foreach and will render the index of each iteration.
| ||||
| This is a static text enclosed by the Insert component. Insert components, according to their specification, do not allow bodies, so this text will be silently ignored.
| ||||
| This is markup text enclosed by the Foreach component and will be rendered unaltered for each iteration of the loop. | ||||