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

apex:dynamicComponent

このタグは動的 Apex コンポーネントのプレースホルダーとして機能します。動的コンポーネントを返す Apex メソッドの名前を受け入れる、1 つの必須パラメーター (componentValue) が含まれます。

次の Visualforce コンポーネントには、動的な Apex 表現��含まれません。
  • <apex:attribute>
  • <apex:component>
  • <apex:componentBody>
  • <apex:composition>
  • <apex:define>
  • <apex:dynamicComponent>
  • <apex:include>
  • <apex:insert>
  • <apex:param>
  • <apex:variable>

1<apex:page controller="SimpleDynamicController">
2    <apex:dynamicComponent componentValue="{!dynamicDetail}" />
3</apex:page>
4
5/* Controller */
6public class SimpleDynamicController {
7
8    public Component.Apex.Detail getDynamicDetail() {
9        Component.Apex.Detail detail = new Component.Apex.Detail();
10        detail.expressions.subject = '{!acct.OwnerId}';
11        detail.relatedList = false;
12        detail.title = false;
13        return detail;
14    }
15
16    // Just return the first Account, for example purposes only
17    public Account acct {
18        get { return [SELECT Id, Name, OwnerId FROM Account LIMIT 1]; }
19    }
20}

属性

属性名 属性型 説明 必須かどうか API バージョン 通用範囲
componentValue UIComponent 動的 Visualforce コンポーネントを返す Apex メソッドの名前を受け入れる。 はい 22.0
id String カスタムコンポーネント定義で他のタグが属性を参照できるようにする識別子。 22.0 グローバル
invokeAfterAction Boolean boolean 値。true の場合、ページまたは送信の action メソッドが呼び出された後に componentValue の Apex メソッドがコールされます。 31.0
rendered Boolean コンポーネントをページに表示するかどうかを指定する boolean 値。指定されていない場合、この値はデフォル��の true に設定されます。 22.0