+ Start a Discussion
Gaurav Jain 67Gaurav Jain 67 

Sequence in Controllers

<apex.page standardController=”Account” extensions =”myExtension”>

myExtension has a public Save Method. Which save method will be used by the VFP ? Std Controller or Extension.. ?

WHat i remember is, is such scenarios, the control moves from left to right and thus VFP will find the Save() method in Standard Controller first and use that. 

Am i wrong here ? If yes, Kindly explain why ?

Narender Singh(Nads)Narender Singh(Nads)
Hi Gaurav,

If you have a save method defined in your extension controller then your VF page will use the save method of your extension controller.
This happens because the standard controller save function defintion gets overidden by the extension controller save function.