Some of the information associated with a binding (such as styles, JavaScript, etc.) can be shared between all usages of that binding. Both the definition and the implementation of a binding can have common parts defined using the bd:common element.
Some of the information associated with a binding (such as styles, JavaScript, etc.) can be shared between all usages of that binding. Both the definition and the implementation of a binding can have common parts defined using the bd:common element.
The following information can be shared:
Styles defined using the style element. If this element is added to the binding definition, it specifies the default styles for the bound elements. In the binding implementation, the element specifies the default styles for the result elements. Note that bd:common can contain only one style element.
Scripts specified using mcs:script. MCS behaves as if they were added to the head element of the outermost html element.
Component classes specified using the cx:component-class element. Common component classes behave as if they were added to the head element of the outermost html element. Note that they can only be referenced from a component using the type name and therefore if a common component class has the id attribute, or does not have the name attribute, then it is ignored.