親要素のタイプ・セーフな属性と属性拡張に関する情報を宣言します。この情報は構成に影響を与えず、メタデータとして使用されます。<attribute>
要素は次の要素に含めることができます。
<attribute> [<description/>]* [<display-name/>]* [<icon/>]* <attribute-name>attributeName</attribute-name> <attribute-class>attributeClass</attribute-class> [<default-value>defaultValue</default-value>] [<suggested-value>suggestedValue</suggested-value>] [<attribute-extension
>attrExtension
</attribute-extension>] </attribute>
<attribute-name>
<attribute-class>
<default-value>
suggested-value>
attribute-extension>
<attribute>
の親要素に適用する実装固有の要素を格納します。
次の例では、カスタムUIコンポーネントcustombanner
の属性borderwidth
を宣言します。
<component>
<display-name>Banner Border Width</display-name>
<component-type>org.comp.CustomBanner</component-type>
<component-class>org.comp.jsf.components.CustomBanner</component-class>
<attribute>
<attribute-name>borderwidth</attribute-name>
<attribute-class>java.lang.Integer</attribute-class>
<default-value>1</default-value>
<suggested-value>1</suggested-value>
</attribute>
</component>
開発ツールでは、構成を読み取り、使用可能なカスタム・コンポーネントとしてcustombanner
を表示し、デフォルト値と推奨値を持つ属性の1つとしてBanner Border Widthを表示します。
<description>要素
<display-name>要素
<icon>要素
JSF構成メタデータについて
リファレンス: JSF構成要素
Copyright © 1997, 2007, Oracle. All rights reserved.