You need to sign in to do that
Don't have an account?
Sujan Kumar Reddy
Order of execution of Getter and Setter values
Hello,
Let say i have one visual force page with Constructor, Getter and Setter methods, What is the order of execution of these methods, it is an interview question which i faced..
Regards,
Sujan
Hi sujan,
Setter is fires first, an then getter fires.
Setter is call before the action methods, the action method execute will be access the variable that was set.
Regards.
All Answers
I think First vf page will executes i.e first line only
<apex:page controller="exampletest">
Then controller calls
In that controller Constructor will fire automatically
Then any methods will fire ..
It may hlpful to you
Hi sujan,
Setter is fires first, an then getter fires.
Setter is call before the action methods, the action method execute will be access the variable that was set.
Regards.
Thank you!!
1. Checks for the Standard Controller in the page.
2. If it is not present, checks for Custom Controller and executes the class and calls Constructor.
3. Invokes action method attribute in the <apex:page> component.
4. Finally calls Getter and Setter methods.
Hope this helps!