Sie sind auf Seite 1von 2

actionRegion tag in Visual force Page 1 of 2

5th July 2011 actionRegion tag in Visual force

Apex: actionRegion tag in Visual force:

This action tag is use AJAX request for particular field or component. Like we
have change the value of pick list in visual force then request go to Server and come
back through AJAX without Saving the VF page.
Also when we fill the VF page and we forget one of the field/pick list which is
mandatory so before submitting Visual force page this field shows error line
comments like Error: You must enter a value by action Region tag.
This action tag will be for particular field only as reference given below VF code for
Action Region tag. https://Salesforce_instance/apex/myPage?id=001D000000IRt53
[https://salesforce_instance/apex/myPage?id=001D000000IRt53]
where id is Opportunitys Id.

Visual force page code:


<apex:page standardController="Opportunity">
<apex:form >
<apex:pageBlock title="Edit Opportunity" id="thePageBlock" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:inputField value="{!opportunity.name}"/>
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.opportunity.fields.type.label}" for="type"/>
<apex:inputField value="{!opportunity.type}" id="type"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.opportunity.fields.stageName.label}"
for="stages"/>
<apex:actionRegion >
<apex:inputField value="{!opportunity.stageName}" id="stage">
<apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
</apex:inputField>
</apex:actionRegion>
</apex:pageBlockSectionItem>
<apex:inputfield value="{!opportunity.closedate}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Posted 5th July 2011 by raees sabir

0 Add a comment

http://salesforcedeveloperblog.blogspot.in/2011/07/actionregion-tag-in-visual-force_0... 28-04-2014
actionRegion tag in Visual force Page 2 of 2

Enter your comment...



Comment as: Select profile...

Publish Preview

http://salesforcedeveloperblog.blogspot.in/2011/07/actionregion-tag-in-visual-force_0... 28-04-2014

Das könnte Ihnen auch gefallen