While using a multiple extension

<apex:page controller="ClassX" extensions="ClassA, ClassB">
        <apex:commandButton value="Refresh" action="{!Refresh}" />

Two part question:

  1. Now if i have Refresh function in all 3 class, which one will be called.
  2. If i need to call the Refresh function from ClassB, then what is the course of action need to be taken.

I have found an existing question about this: How to call methods from multiple extensions in visual force page .

Generally, you can't really control which one to call. So it will be a better idea to change your method name. I have done this experiment about this as well. The method in the first extension will always be called.

The doc is here: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.