9 votes
Accepted

Visualforce: Dynamically ReRender a row within <apex:repeat> by passing $Component through controller

Through attempting this same problem on another project I was able to get a fresh look at the issue. What I learned through countless testing is that rerender attribute can be very tricky. For example:...
  • 4,460
6 votes
Accepted

<apex:actionFunction> may not be used within an iterable component

You need to move your action function outside your iteration block and call it via Javascript by passing the parameter. So before your iteration put this: <apex:actionFunction action="{!...
6 votes
Accepted

How to disable a apex command button

You should set the btnDisabled class name, as well as setting "disabled". Here's a live example for you to use: <apex:page standardStylesheets="true" lightningStylesheets="false" showHeader="true" ...
  • 462k
6 votes
Accepted

apex:actionFunction not passing the parameters

Action function is required to have rerender attribute set so that it posts payload back to server. So something like this should work. <apex:actionFunction name="Sign_Up" action="{!SignUp}" ...
  • 1,692
5 votes
Accepted

apex:commandButton updated by apex:actionFunction

One way use action status. Display loading symbol unit your process is not completed. <apex:actionFunction action="{!startRequest}" name="startRequest_JS" ...
  • 22.3k
5 votes
Accepted

Used html button instead of apex command button,controller action not updating new values?why

Values from your page are sent to a controller on form submit. You can see this if you view HTML code generated by your visualforce page <apex:commandButton/> will be an input with type="submit"....
  • 2,121
5 votes

visualforce page ActionFunction reRender not Working

You can absolutely rerender the <use>and <svg> tag by: The xmlns= on the div containing the SVG is a MUST as if you try to rerender without it the page will simply stall. Important trick ...
  • 53.6k
5 votes
Accepted

apex:input with oncomplete

You need to actually invoke the function for onchange attributes by using parentheses (()). No Good <apex:input onchange="someMethod" ... /> Good <apex:input onchange="someMethod();" ... /...
  • 147k
5 votes
Accepted

ActionFunction not working properly.Values not getting passed to controller

add rerender attribute in your actionFunction, like this rerender='none'. It is a known issue in Salesforce that if you are not using rerender, then your actionFunction may not work properly.
4 votes
Accepted

apex:selectList always passing older value on onchange..?

It's because your reference twice hr.projectVal, that's why it's getting confused, one in your select and one in your param. Remove your param and it should fix your problem, it's useless. Update ...
  • 5,595
4 votes

OnComplete Javascript to pop up alert and Redirect to a record page

So when you create the script and use the binding the value of the binding is the what it was when the page loads. If all you wanted to do was redirect to the new case (without a message) that is ...
  • 53.6k
4 votes
Accepted

Action function not rerendering

You cannot rerender an element if it has a conditional render attached to it and the condition will not rerender so its state will remain the same (shown or hidden depending on the condition). You ...
  • 53.6k
4 votes

Visualforce actionFunction not working when used with jQuery

JavaScript is case-sensitive. In one function name, you've got an uppercase C and in another you've got a lowercase c. The name attribute on the <apex:actionFunction tag is used as the name of the ...
  • 22.7k
4 votes
Accepted

Can apex:param pass null for Integers?

It looks like the problem is that when the parameter comes over as an empty string, salesforce converts the value to 0 instead of NULL. You could consider setting the value of index in your method ...
  • 12.5k
4 votes

Why actionFunctions are not as fast as RemoteAction

In the thread @sfdcfox have provided several good points.Posting some of them which are related to your answer: @RemoteAction methods require less bandwidth, and server processing time, because only ...
  • 5,744
4 votes
Accepted

Apex:param not sending parameter in actionFunction

I have had mixed luck doing it like that (probably my own fault). However I know this works (string values): public string paramValue {get;set;} public pagereference AttachFile(){ system....
  • 53.6k
4 votes

action callback from apex controller a.getReturnValue() is empty

You need to mark the properties of the inner class as @AuraEnabled for them to be returned. This is likely why you are seeing a null return value (there is no visible data to return). Note that you ...
  • 3,972
4 votes
Accepted

apex:actionsupport event not firing

You have to nest the <apex:actionSupport> tag within the tag whose action you are trying to support. You have it inverted. Correct <a ...> <apex:actionSupport ... /> </a> ...
  • 147k
4 votes
Accepted

Call 2 methods on page load

You're missing rerender in your apex:actionFunction, without which whole page would reload. Your JavaScript code looks fine. Have a dummy apex:OutputPanel for rerendering. I suspect your second ...
  • 18.3k
4 votes
Accepted

Action Function Param Not Passing to Controller

Salesforce has built the framework for apex:actionFunction like that way that it expects rerender attribute to pass value to the controller and the ID of one or more components that are redrawn when ...
4 votes
Accepted

Using Param in ActionFunction - Unexpected Token ':'

You need to specify a name attribute, or you would get unexpected behavior. <apex:param name="aValue" value="" assignTo="{!variableFromVfp}"></apex:param>
  • 462k
3 votes

Question about Visualforce/Save Action Usage

You can list the campaign members using a StandardSetController, then call its save method: <apex:pageBlocktable value="{!campaignMembers.Records}" var="cm"> <...
  • 462k
3 votes
Accepted

Action Function Javascript Page Rerendering

Try this structure and make sure that tag <script> is not part of apex form: <apex:form> <!-- other stuff --> <apex:actionFunction name="doCallout" action="{!callout}"...
  • 22.4k
3 votes

Visualforce page reloads itself after actionFunction call

Instead of using false in the rerender attribute, you should just leave is blank. Example rerender="". That has worked for me.
3 votes

Controller property set to null after ActionFunction execution

If you put some apex variable in the javascript code, the variable will retain its value. So if you for example define signinred = false; in the constructor and then put this variable on the page into ...
  • 21.8k
3 votes
Accepted

Call two controller method from a single comandbutton click

The simplest and legitimate way to do this is by calling getprev method at the end of AddMore Something like this: public void AddMore() { //count = count+1; ...
  • 9,050
3 votes

<apex:actionFunction> tag does NOT work as expected without reRender attribute

If you're passing parameters then yep, unfortunately it's always been like that! I blogged about it nearly 5 years ago and it's consistantly been my most popular post! If you look at the JavaScript ...
  • 25.1k
3 votes

Visualforce Page redirect not working from apex actionfunction

try <apex:commandButton value="Create" onclick="createfunction(); return false;" />
  • 31
3 votes

<apex:actionFunction> may not be used within an iterable component

Why is your actionFunction inside of a repeater? Think about the way AF's work. They are Javascript functions... And you wouldn't create the same function n times. Instead, put the function outside ...
3 votes
Accepted

How to pass parameters from a VF page to a controller extension

Main Issue: No rerender on the action function. Removing that produces an attempt to dereference null object. SO I essentially added that to the actionFunction and it all started to work. Issue has ...
  • 53.6k

Only top scored, non community-wiki answers of a minimum length are eligible