The usage of a component can be declared either in the container component's template or in its specification. Components declared in the template are called Implicit components and those declared in the specification are called Explicit components. Implicit components have to be configured in the placeholder tag in its entirety while Explicit components can be configured either in the template or in the specification or partly in the template and partly in the specification.
The placeholder tag is an essential part of component declarations. Component declarations in placeholder tags are specified via the jwcid attribute as shown below.
The placeholder tag in the template is simply a placeholder for the component to be rendered in its place; it will be completely replaced by the output from the component in the final rendered web page. Hence the tag used for the placeholder can be any well-formed XML tag. But typically the placeholder is specified with appropriate HTML tags, so the template can be previewed outside the context of the application.
... <span jwcid="userName" /> |
Component declarations in specifications are specified via the <component> tag as shown below.
... <component id="userName |
| Component ID. The ID here is the same ID that is assigned to the component via the template jwcid attribute. |
| Component type. The type is what determines the type of component to be used. |