<componentRef> 要素には次の属性があります。
modifier – modifierEnum 型のオプション属性で、コンポーネント参照のオーバーライド要件を指定します。この属性は次の値を取ります。
ABSTRACT – <componentRef> 要素の <component> 子要素は省略されるため、非抽象派生コンポーネントによって指定する必要があります。<componentRef> を抽象と宣言できるのは、そのコンポーネントも抽象と宣言されている場合だけです。非抽象 <componentRef> は、<component> 要素を宣言する必要があります。
FINAL – <componentRef> は派生コンポーネントによってはオーバーライドできません。
この属性を指定しない場合、派生コンポーネントはコンポーネント参照をオーバーライドするかどうかを選択できます。
name – identifier 型の必須属性で、参照先コンポーネントのローカル名を指定します。この名前は、すべての兄弟 <componentRef> 要素の中で一意となるようにする必要があります。
installMode – オプション属性で、参照先コンポーネントをインストールし、その後対象設定を行う方法を指定します。この属性を指定しないと、値は NESTED になります。
この属性は次の値を取ります。
TOPLEVEL – 参照先コンポーネントが TOPLEVEL としてインストールされている場合、1 つのプランで直接インストールされたかのように、ほかの任意のコンポーネントがそのコンポーネントを使用できます。
NESTED – 参照先コンポーネントが NESTED としてインストールされている場合、そのインストールの範囲は参照元コンポーネントのインストール範囲に暗黙に限定されます。そのサービスも参照元コンポーネントでしか利用できません。
論理的に、入れ子になった参照先コンポーネントは参照元コンポーネントが要求する細かな機能単位を定義しますが、この機能はほかのコンポーネントに役立つことはありません。一方、最上位の参照先コンポーネントは参照元コンポーネントが使用するサービスを定義しますが、ほかのコンポーネントもこのサービスを使用できます。
入れ子になった参照先コンポーネントの有効期間は、参照元コンポーネントの有効期間と暗黙に同じになります。入れ子になった参照先コンポーネントのインストールは参照元コンポーネントのインストールの最中にしか行えず、参照元コンポーネントがアンインストールされる際に暗黙にアンインストールされます。これに対し、最上位の参照先コンポーネントの有効期間は、参照元コンポーネントの有効期間には拘束されていません。最上位の参照先コンポーネントは、参照元コンポーネントのインストール時に参照元コンポーネントによってインストールすることができます。また、最上位の参照先コンポーネントがすでにインストールされている場合は、ほかの方法でインストールすることもできます。参照元コンポーネントがアンインストールされる場合、明示的に参照元コンポーネントによってアンインストールされない限り、最上位の参照先コンポーネントはインストールされたままとなります。 また、ほかのコンポーネントも参照元コンポーネントをアンインストールできます。
<targetRef> 要素を定義するコンポーネントを参照するには、TOPLEVEL <componentRef> を使用する必要があります。NESTED <componentRef> は使用できません。