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

apex:actionRegion

AJAX 要求の生成時に Force.com サーバが処理する必要のあるコンポーネントを区切る Visualforce ページの領域です。<apex:actionRegion> の本文のコンポーネントのみがサーバによって処理されるため、ページのパフォーマンスが向上します。

<apex:actionRegion> コンポーネントは要求時にサーバが処理するコンポーネントのみを定義します。要求が完了したときに再表示されるページの領域は定義しません。動作を制御するには、<apex:actionSupport><apex:actionPoller><apex:commandButton><apex:commandLink><apex:tab>、または <apex:tabPanel> コンポーネントの rerender 属性を使用します。

transient キーワードの使用」 も参照してください。

1<!-- For this example to render properly, you must associate the Visualforce page 
2with a valid opportunity record in the URL. 
3For example, if 001D000000IRt53 is the opportunity 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<apex:page standardController="Opportunity">
8  <apex:form >
9    <apex:pageBlock title="Edit Opportunity" id="thePageBlock" mode="edit">
10   
11      <apex:pageBlockButtons >
12        <apex:commandButton value="Save" action="{!save}"/>
13        <apex:commandButton value="Cancel" action="{!cancel}"/>               
14      </apex:pageBlockButtons>
15
16    <apex:pageBlockSection columns="1">
17      <apex:inputField value="{!opportunity.name}"/>
18      <apex:pageBlockSectionItem>
19      <apex:outputLabel value="{!$ObjectType.opportunity.fields.stageName.label}" 
20                        for="stage"/>
21      <!-- 
22           Without the actionregion, selecting a stage from the picklist would cause 
23           a validation error if you hadn't already entered data in the required name 
24           and close date fields.  It would also update the timestamp.
25      -->
26      <apex:actionRegion>
27        <apex:inputField value="{!opportunity.stageName}" id="stage">
28          <apex:actionSupport event="onchange" rerender="thePageBlock"
29                              status="status"/>
30          </apex:inputField>
31          </apex:actionRegion>
32      </apex:pageBlockSectionItem>
33        <apex:inputfield value="{!opportunity.closedate}"/>
34        {!text(now())}
35        </apex:pageBlockSection>
36
37      </apex:pageBlock>
38    </apex:form>
39</apex:page>

属性

属性名 属性型 説明 必須項目 API バージョン 通用範囲
id String ページの他のコンポーネントがコンポーネントを参照できるようにする識別子。 10.0 グローバル
immediate Boolean ページの項目に関連付けられている入力規則を処理することなく、このコンポーネントに関連付けられているアクションをすぐに実行するかどうかを指定する boolean 値。true に設定すると、アクションがすぐに実行され、入力規則はスキップされます。指定されていない場合、この値はデフォルトの false に設定されます。 11.0 グローバル
rendered Boolean コンポーネントをページに表示するかどうかを指定する boolean 値。指定されていない場合、この値はデフォルトの true に設定されます。 10.0 グローバル
renderRegionOnly Boolean actionRegion の処理時に actionRegion 外で AJAX が呼び出す動作を無効にするかどうかを指定する boolean 値。true に設定すると、actionRegion 外にあるコンポーネントは AJAX レスポンスには含まれません。false に設定すると、ページのすべてのコンポーネントがレスポンスに含まれます。指定されていない場合、この値はデフォルトの true に設定されます。 10.0 グローバル