0
votes

I'm trying to pass a parameter from a Visualforce page to the controller in an apex:actionfunction however I'm facing a strange dilemma.

The only way the apex:param works with the action function is if there is a rerender attribute on it. Unfortunately I can't use a rerender because I also have an apex:inputfile on the page; which causes an error if there is a rerender attribute.

Any ideas how to pass a parameter to the controller without using an apex:param.

1

1 Answers

0
votes

If you are so particular about not using apex:param, then you should consider using JavaScript Remoting to pass parameters from Visualforce to Apex.

Otherwise if you are okay to use apex:param but the problem is only with apex:inputFile tag, then you should use apex:actionRegion tag.

I am not posting the complete code, but just giving you the references below. Hope the below links will help:

Passing a value from Visualforce Page to Controller

apex:actionRegion - Visualforce Developer Guide

JavaScript Remoting - Visualforce Developer Guide