4.6. Component Copies

There may be situations when you would want to duplicate a component on a page for usability and it would be a pain to declare and configure this component for every occurance on the page. For this reason there is a way to copy the component declaration.

[Note]Note
Component declarations can only be copied in the specification.

...
<component id="originalComponentId" ... > 1 
...
</component>
...
<component id="newId" copy-of="orignalComponentId" /> 2 
...

1

This is the original component declaration with bindings and other configuration.

2

This is a new component in the container with a new id, but its type and configuration is copied from the original component declaration. The copy-of attribute specifies the id of the original component.

[Caution]Caution
A component declaration can specify either the copy-of or the type, but not both.