<component> element

Appears in: <component-specification> and <page-specification>

Defines an embedded component within a container (a page or another component).

In an instantiated component, embedded components can be accessed with the OGNL expression components.id.

Figure B.7. <component> Attributes

NameTypeRequired ?Default ValueDescription
idstringyes Identifier for the component here and in the component's template. Must be a valid Java identifier.
typestringno A component type to instantiate.
copy-ofstringno The name of a previously defined component. The type and bindings of that component will be copied to this component.

Either type or copy-of must be specified.

A component type is either a simple name or a qualified name. A simple name is the name of an component either provided by the framework, or provided by the application (if the page or component is defined in an application), or provided by the library (if the page or component is defined in a library).

A qualified name is a library id, a colon, and a simple name of a component provided by the named library (for example, contrib:Palette). Library ids are defined by a <library> element in the containing library or application.

Figure B.8. <component> Elements