You need to sign in to do that
Don't have an account?

Call remote action inside nested class
I have a Controller with a remote action.
I would like to move that remote action to a nested apex class.
Controller1.controller2.remoteAction
Currently, I have the remote action in Controller1:
MemberProfileController.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)
but I want to move it to the nested controller:
MemberProfileController.nestedContrller.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)
How can I access the method, as a remote action, inside the nested class?
This does not work:
MemberProfileController.nestedController.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)
nor does trying to get an instance of it in javascript.
I would like to move that remote action to a nested apex class.
Controller1.controller2.remoteAction
Currently, I have the remote action in Controller1:
MemberProfileController.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)
but I want to move it to the nested controller:
MemberProfileController.nestedContrller.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)
How can I access the method, as a remote action, inside the nested class?
This does not work:
MemberProfileController.nestedController.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)
nor does trying to get an instance of it in javascript.
Well, remote actions must be static and static methods are only allowed in outer classes -- so I don't think that's possible.