<apex:actionRegion> component only defines which components the server processes during a request—it does not define what area(s) of the page are re-rendered when the request completes.
Action Region: An area of a Visualforce page that demarcates which components should be processed by the Force.com server when an AJAX request is generated. Only the components in the body of the <apex:actionRegion> are processed by the server, thereby increasing the performance of the page.
Using Action region you can bypass the validation rules and increase the visual force page performance. Please the below example for how to bypass validation rules in visualforce page.
public class ActionRegionCLS{
public String reqAccNumber{get;set;}
public Account accObj{get;set;}
public ActionRegionCLS(){
accObj = new Account();
}
public void fillRecord(){
if(reqAccNumber !=null && reqAccNumber !=''){
List<Account> accLst = new List<Account>();
accLst = [select id,Name,AccountNumber,Type,AnnualRevenue from Account where AccountNumber =:reqAccNumber];
if(accLst !=null && accLst.size()>0){
accObj = accLst[0];
}
else{
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.Info,' No Records found with this Account Number:'+reqAccNumber);
ApexPages.addMessage(myMsg);
accObj = null;
}
}
}
}
Once you enter account number value in Account Number text box and click on Retrieve button, it going to get the details of "Account Name", "Account Type" without reloading the entire page.Using action region we are updating particular HTML area section with Rerender Tag.
Action Region:
An area of a Visualforce page that demarcates which components should be processed by the Force.com server when an AJAX request is generated. Only the components in the body of the <apex:actionRegion> are processed by the server, thereby increasing the performance of the page.
Using Action region you can bypass the validation rules and increase the visual force page performance.
Please the below example for how to bypass validation rules in visualforce page.
VisualForce Page
Controller
Once you enter account number value in Account Number text box and click on Retrieve button, it going to get the details of "Account Name", "Account Type" without reloading the entire page.Using action region we are updating particular HTML area section with Rerender Tag.
Hope this helps you!
Best Regards,
Jyothsna
Please check the below links:
http://sfdcsrini.blogspot.com/2014/07/visualforce-action-region-example.html
http://salesforce.stackexchange.com/questions/44935/apexactionregion-understanding
http://www.sfdcpoint.com/salesforce/actionregion-visualforce-salesforce/
Hope this helps you!
Best Regards,
Deepthi