I would like to know what actually happens on re-render (Ajax Call and DOM replacement) in Salesforce.
My Idea:
- The ajax call is made to get data.
- On completecompletion of the ajax call, the DOM is constructed(the new part).
- The DOM Element is updated/replaced.
My question is, isIs the DOM updated or replaced?
My Scenario :
I'veI have a Visualforce Page which has multiple input items. I bindbinds keypress event
to the input
elements on document ready. An action function is present which re-renders a section of the page.
Now, the input elements in the re-rendered panel do not have a keypress event
binding.
ButHowever, when I have the document.ready()
script in the re-rendered output panel, the keypress event
gets binded.
Can someoesomeone explain what exactly how exactly re-render works?