[SalesForce] ApexPages.currentPage().getParameters with javascript remoting

I am working with a VF page that uses javascript remoting to do some work that an earlier developer made. There won't be an easy way to move the remoted method into the controller as a normal method that I can access through the page because it is used all over the place on other pages and has some pretty 'waiting to finish' messages built into the javascript as well.

The problem I have is that I need to get the ApexPages.currentPage().getParameters() to be accessible here. I cannot grab specific values to pass into the method either because the parameters will be dynamic. Is there any way to do this or is my only option to do all of the work to no longer use remoting?

Best Answer

@dphil Your going to have to pass the current page to the @RemoteAction, because these methods are global they do not have context with the controller they are a part of, as the ApexPages class does.