There are already many threads on the confusion with Visualforce's Lifecycle/Execution Order, as their should be because its pretty confusing the more complicated your applications becomes. With that said, I assure you I've read many threads, articles, and SF documentation to prior to this post but I still have a question.
Understanding that a controller/extension's constructor executes before the getters, I had a situation where that didn't seem to be the case but I believe it is because of a misunderstanding about syntax.
If I setup a get;set;
like this:
public List<Object__c> dropdown_list { get; set; } {
// I thought this was setting up the getter
// but if I add a debug here it fires BEFORE
// the constructor
}
But if I swap the syntax to the following:
public List<Object__c> dropdown_list {
get{
// Now the execution order fires as expectedhow
// AFTER the constructor
} set;
}
Why is this? What am I not understanding about this and what is the proper terminology for the two structures (as well as any other unlisted scenarios)?