12
votes
Accepted
Is there a guaranteed execution order of rerender and oncomplete
The order of operations with an ajax request is:
onClick/onSubmit functions are called
ajax form POST to controller
(wait patiently while controller does work)
response received from Salesforce
...
12
votes
Accepted
Lightning Components: How to make sure that a script loaded via ltng:require is loaded in aferRender()?
As per @TrevorBliss comments , adding afterScriptsLoaded to the ltng:require is sufficient which means there's no need for the renderer.
If you really need to do this in the renderer, then you need ...
10
votes
Accepted
SelectRadio Not Working Rerender outputPanel
Your apex:outputPanel with id="Travel_block" is not rendered by default, because the selectedAPTransport variable is not Yes. If it is not rendered, then it is not accessible by ID for actionSupport. ...
9
votes
Accepted
rendered= expressions and use of the ! operator
{!} is merge syntax
Adding parentheses may help visualize what is happening in your evaluations.
true and not true == false
<apex:outputLink rendered="{! (isTrue && !isTrue) }">
...
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:...
8
votes
Action support Rerender not working
You've fallen into a tricky gotcha with re-rendering. When the re-render is processed, only the children of the re-rendered component or re-processed. Hence the your {!opportunity.stageName === 'Lead ...
7
votes
Accepted
reRender commandButton depending on selectOption value in visualforce
Putting an <apex:outputPanel> inside your <apex:pageBlockButtons> tags and using that as the rerender target makes the page work as expected:
<apex:selectList value="{!selectId}" ...
7
votes
Accepted
Why is my Lightning aura:iterate component not iterating?
Please change
<aura:attribute name="expenses" type="Sledgehammer.Expense__c" />
to
<aura:attribute name="expenses" type="Sledgehammer.Expense__c[]" /> in your "form.cmp"
7
votes
Accepted
Urban Legend? Must Return PageReference To Rerender
Analysis
Conclusion
You do not need to return a PageReference for rerender to understand when the action has completed. So if you have a method that will never cause a redirect, you can make it void ...
6
votes
Accepted
what happens when rerender="nothing"?
If you have defined some value for the reRender parameter of the command button it will be recognized as an element ID and this element will be refreshed. So it is not important what value is used, ...
6
votes
Accepted
How to call a javascript when a page Rerenders?
If you want to call the JavaScript after the re-render use the oncomplete attribute of apex:actionPoller to make the function call:
The JavaScript invoked when the result of an AJAX update
...
6
votes
Accepted
Layout issue with reRender inputfield on Visualforce page
The apex:outputPanel is messing up your output, as it causes all of its children to be rendered in the same column (it's intended to group together elements inside an apex:panelGrid).
<...
6
votes
Accepted
actionSupport reRender not working in my VF page
There are 2 issues in your code.
event "onchange" is case sensitive (all will be in lower case). So, DO NOT use "onChange"
If you are using actionSupport for rendering then <apex:inputText ...
5
votes
Accepted
jQuery Datatable disappears once rerender the pageBlockTable using actionFunction. Any suggestions?
apex:actionFunction has an oncomplete attribute where you can specify JavaScript to run once the partial page update has completed. So you will need to move your DataTables setup code into a function ...
5
votes
Accepted
commandbutton not running action function after reRender
Pretty sure it is related to this issue/bug re Command Buttons and Action Regions.
I just tried a short version of your code with the button wrapped in an actionregion, and it then worked for me.
5
votes
Accepted
pressing enter on inputText does not trigger commandButton
Catch the enter-key at your inputText with the onkeypress-handler and trigger a fake-click on the button:
<script>
function handlerKeyPress(ev) {
if (window.event && window....
5
votes
Accepted
Order of execution of controller method calls during rerender
You can't depend on the order of setters or getters. You should avoid doing this at all cost. In fact, you can't even guarantee that your setters or getters will be called only once per transaction, ...
5
votes
Accepted
Lightning design system - SVG disappears after rerender
Its a known bug in SFDC Visualforce page .I have used a jquery approach with action function to manually write the DOM .You can use Oncomplete event and custom write the DOM to replace
The Script ...
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
Sub Output Panel not rendering on Re-render
Rendered is not reevaluated when directly rerendering the element. You need to rerender the parent element.
If the element is not rendered initially a rerender on that element will not work
Since ...
5
votes
Accepted
Visualforce Page's outputText not updating when other outputPanels are next to it. Why?
You need to change the code like this way
Firstly, Remove immediate=true from apex:selectRadio which stops assigning controller attribute properly.
Secondly, Wrap those outputPanels (which are ...
5
votes
How to call an apex class and visualforce after every 5 seconds to display updated data
Polling every 5 seconds is bad imo and waste of resources. Polling generally slows things down as well.
From what I can see if all you want is a notification for newly created, deleted case. Once you ...
4
votes
Accepted
CommandButton action method doesn't display expected page
The code fragment in your next() action method
Pagereference newaccount1 = new Pagereference('/001/e?nooverride=1&acc2='+aname+'&acc18street='+ashippingstreet+'&acc18city='+acity+'&...
4
votes
How to render as pdf when loading the existing website into the VF page
You can't put iFrames, Javascript and that sort of stuff in a PDF. The PDF render engine only looks at the DOM as it is when the page is loaded (HTML/CSS/VF).
You can get the content of the website (...
4
votes
Accepted
Custom component controller is not re-instantiated by a rerender?
Constructors are only called when the page is first loaded. Odds are, you'll want to expose an actionFunction in the component and call that function as the oncomplete function from your reRender. ...
4
votes
How to create tabs for an apex:tabPanel dynamically with apex:repeat and rerender?
Unfortunately you can't use the apex:tabPanel with the apex:repeat as you tried:
apex:repeat
This component can't be used as a direct child of the following
components:
<apex:panelBar>...
4
votes
Accepted
Rerender after apex:detail with inlineEdit is saved
It may not be ideal, but I got somewhere that works.
After trying out Amr Ibrahim's advice, I used an <apex:actionFunction> element which re-renders the outputPanel. On the <apex:detail>'...
4
votes
Accepted
ActionSupport rerender not working
There were two problems:
You need to wrap rating in actionRegion since Account name is mandatory.
Also you have placed ! at wrong place in redered condition. I have made corrections. Please check ...
4
votes
Accepted
Rerender two visualforce elements after each other?
You could utilize the oncomplete attribute to ensure the order of the reRendering.
e.g.
// here you are reRendering two elements
<apex:actionSupport event="onchange" action="{!getSelected}" ...
4
votes
Only rerender row in <apex:pageBlockTable> using <apex:actionRegion>
I found a way to rerender the rows while only processing the row you're on. I will try to outline the concept here but a a full description of my solution can be found here:
Visualforce: Dynamically ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rerender × 375visualforce × 268
apex × 100
actionfunction × 33
javascript × 31
visualforce-component × 24
outputpanel × 24
actionsupport × 23
rendered × 21
pageblocktable × 19
lightning-aura-components × 18
commandbutton × 17
controller × 14
selectlist × 11
picklist × 10
datatable × 9
lightning × 8
commandlink × 8
lightning-web-components × 7
ajax × 7
button × 6
repeat × 6
refresh × 6
pageblocksection × 6
jquery × 5