Skip to main content
grammar and syntax corrections, improved readability
Source Link

I would like to know what actually happens on re-render (Ajax Call and DOM replacement) in Salesforce.

My Idea:

  1. The ajax call is made to get data.
  2. On completecompletion of the ajax call, the DOM is constructed(the new part).
  3. 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?

I would like to know what actually happens on re-render (Ajax Call and DOM replacement) in Salesforce.

My Idea:

  1. The ajax call is made to get data.
  2. On complete of ajax call, the DOM is constructed(the new part).
  3. The DOM Element is updated/replaced.

My question is, is the DOM updated or replaced?

My Scenario :

I've a Visualforce Page which has multiple input items. I bind 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.

But, when I have the document.ready() script in the re-rendered output panel, the keypress event gets binded.

Can someoe explain what exactly how re-render works?

I would like to know what actually happens on re-render (Ajax Call and DOM replacement) in Salesforce.

My Idea:

  1. The ajax call is made to get data.
  2. On completion of the ajax call, the DOM is constructed(the new part).
  3. The DOM Element is updated/replaced.

Is the DOM updated or replaced?

My Scenario :

I have a Visualforce Page which has multiple input items. I binds 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.

However, when I have the document.ready() script in the re-rendered output panel, the keypress event gets binded.

Can someone explain how exactly re-render works?

Added appropriate tags
Link
Question has nothing to do with Apex
Link
metadaddy
  • 16.5k
  • 5
  • 57
  • 103
Tweeted twitter.com/#!/StackSalesforce/status/281440140176523264
Source Link
Loading