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:...
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" ...
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}" ...
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"
...
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"....
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 ...
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();" ... /...
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
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 ...
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....
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 ...
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 ...
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 ...
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>
...
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 ...
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>
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
Visualforce Page redirect not working from apex actionfunction
try
<apex:commandButton value="Create" onclick="createfunction(); return false;" />
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 ...
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">
<...
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}"...
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 ...
3
votes
Accepted
action callback from apex controller a.getReturnValue() is empty
There are two particular bugs
1.The nested or inner classes always fails for me .I always create a separate class and never mix as inner class if i am using the apex for lightning component
2.Make ...
3
votes
Accepted
Using action and onclick together on command button
If you want to abort the action, return a value. If you do not want to abort the action, do not return a value.
Example:
<apex:commandButton value="Do Something"
onclick="if(!...
3
votes
Accepted
Controller variables set to null after being updated in actionFunction
You should call second action function in onComplete of first action function. Then only it can ensure logTransactionDetails() is executed and value assigned to mainOutboundLog variable. Use this code ...
3
votes
Call actionFunction from actionSupport onComplete
I think your ultimate goal is to pass selected lookup value to the controller and you have taken a complicated route.
Here is the simple way to achieve the functionality leveraging action attribute ...
3
votes
Action Function Param Not Passing to Controller
Please find below updated controller code which might help you :
On Controller:
Declare a public variable with name as "passedVariable":
public String passedVariable{get;set;}
Make sure that you ...
3
votes
How to Add spinner to SLDS VF page when button is clicked
You can use this code & pass action status id into your commanLink status :
<apex:actionStatus id="myAjaxStatus" >
<apex:facet name="start" >
<div style="...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
actionfunction × 235visualforce × 147
apex × 78
javascript × 53
rerender × 34
commandbutton × 18
controller × 17
actionsupport × 15
visualforce-component × 9
ajax × 9
apex-param × 9
lightning-aura-components × 7
javascript-remoting × 7
pagereference × 7
apexactionfunction × 7
jquery × 6
action × 5
commandlink × 5
html × 4
parameters × 4
onclick × 4
redirect × 3
repeat × 3
rendered × 3
inline-visualforce × 3