I am trying to pass url parameters between Apexpages and component but am not successful in achieving this. When I call ApexPages.currentPage.getParameters().put('test','aaa')
in a pagecontroller and then call ApexPage.currentPage.getParameters().get('test') in a component controller which resides in that page. The method returns nothing. Can someone tell me how can I persist the url parameters between page controller and component controller?
thank you
Best Answer
I think your question was unclear. You said that the value needs to be pass from the page to controller.but if the value is dynamic then you have to workaround on
<apex:param>
tag.If you are passing the parameters like ID then You have to append the URL of vf page with your ID and value like below
https://yourdomainname/apex/vfpagename?test=value
And get the parameter in the controller using
ApexPages.currentPage.getParameters().get('test');
Update:
Try the below link
https://developer.salesforce.com/forums/?id=906F000000096wsIAA
Hope this might helps....