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

actionFunction params not getting passed to controller
Hi,
I have this actionFunction:
<apex:actionFunction action="{!addStuff}" name="addStuffJS"> <apex:param name="firstParam" assignTo="{!xAdded}" value="" /> <apex:param name="secondParam" assignTo="{!yAdded}" value="" /> <apex:param name="thirdParam" assignTo="{!zAdded}" value="" /> </apex:actionFunction>
and in the controller there is:
public String xAdded { get; set; } public String yAdded { get; set; } public String zAdded { get; set; } public void addStuff() { system.debug('added x: ' + xAdded); }
The actionFunction is called from a JS script which itself is invoked after some button is pressed like so:
function btnActionJS() { for (var i=0; i < thisArray.size(); i++) { addStuffJS(thisArray[i]x, thisArray[i].y, thisArray[i].z); } }
The issue is that the values for xAdded, yAdded, and zAdded on the controller are all null when the button on the page is pressed (the debug statement on addStuff() prints null). Am I doing something wrong somewhere?!
Thanks.
All Answers
I just had to do exactly the same! Elements were not being passed through unless I added a dummy reference to my rerender!
Used this pattern in a few VF pages but since our upgrade to Winter 11 this no longer works. The the param gets passed in the POST as before but never gets binded to property on the controller.
Anyone else having problems with passing parameters in the actionFunction since the release of Winter 11?
-Tom