この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

apex:facet

<apex:dataTable> のヘッダーまたはフッターなどの、親コンポーネントの特定の部分で表示されるコンテンツのプレースホルダです。

<apex:facet> コンポーネントは、親が facet をサポートしている場合にのみ、親コンポーネントの本文に含めることができます。facet コンポーネントの名前は、親コンポーネントの事前定義された facet 名の 1 つと一致する必要があります。この名前により facet コンポーネントのコンテンツが表示される場所が特定されます。facet コンポーネントが親コンポーネントの本文内で定義される順序は、親コンポーネントの表示には影響しません。

facet の例については、<apex:dataTable> を参照してください。

注意: Apex で直接 <apex:facet> を表すことはできませんが、facet を持つ動的コンポーネントで指定できます。次に例を示します。
1Component.apex.dataTable dt = new Component.apex.dataTable();  
2dt.facets.header = 'Header Facet';
1<!-- For this example to render properly, you must associate the Visualforce page 
2with a valid account record in the URL. 
3For example, if 001D000000IRt53 is the account ID, the resulting URL should be: 
4https://Salesforce_instance/apex/myPage?id=001D000000IRt53
5See the Visualforce Developer's Guide Quick Start Tutorial for more information. -->
6         
7<!-- Shows a two column table of contacts associated with the account.  
8The account column headers are controlled by the facets.-->
9
10<apex:page standardController="Account">
11    <apex:pageBlock title="Contacts">
12        <apex:dataTable value="{!account.Contacts}" var="contact" cellPadding="4" border="1">
13            <apex:column >
14                <apex:facet name="header">Name</apex:facet>
15                        {!contact.Name}
16            </apex:column>
17            <apex:column >
18                <apex:facet name="header">Phone</apex:facet>
19                        {!contact.Phone}
20            </apex:column>
21        </apex:dataTable>
22    </apex:pageBlock>
23</apex:page>

属性

属性名 属性型 説明 必須項目 API バージョン アクセス
name String 表示する facet の名前。この名前は親コンポーネントの事前定義されている facet 名の 1 つと一致する必要があり、facet コンポーネントのコンテンツが表示される場所を特定します。たとえば、dataTable コンポーネントには「header」、「footer」および「caption」という名前の facet があります。 はい 10.0 global