Order of execution in Visualforce page

1. Constructor of the controller.

2. Action method of the page.

3. Getter methods.

Sample Code:

Visualforce page:

<apex:page controller="Sample" action="{!sav}">
    <apex:outputText >{!mem}</apex:outputText>

Apex Controller:

public with sharing class Sample {

    public String mem {
       get { return 'getter';}  

    public sample() {
        mem = 'constructor';
    public void sav() {
        mem = 'action';



No comments:

Post a Comment