I have an actionfunction called from JavaScript
attach_file('remote_input');
I have the actionFunction tag:
<apex:form id="content" >
<apex:actionfunction name="attach_file" action="{!AttachFile}" reRender="">
<apex:param name="inputparam" value="" />
</apex:actionfunction>
</apex:form>
and in the controller i am waiting for the parameter, but i get 'null
'
public pagereference AttachFile(){
String input_param = Apexpages.currentPage().getParameters().get('inputparam');
system.debug(input_param);
return null;
}
I have tried reRendering to none, # and it still does not work, I have tried displaying all the parameters received in the debug log and the 'inputparam' does not appear at all. I've tried setting the value to a global variable in the controller and it sets to null.
Any suggestions will be appreciated. Thank you
Best Answer
I have had mixed luck doing it like that (probably my own fault). However I know this works (string values):
and the page
Update: Complete Example
Class
Page
Debug
So start from here and add your own code till it breaks. Then you will know what went wrong