Tuesday, December 6, 2016

Visualforce - Beyond Basics Series 3 - Pass params to action methods

What is action methods ?

After the page load, we can send requests to server asynchronously to perform some actions which is called action methods. This is achieved by sending POST request along with necessary parameters in headers.


When it will be useful ?

This is useful in cases where user needs to take small actions & update the small portion of the screen without reloading the whole page.

How to pass values to action methods ?

We can pass parameters using param tag for these four action tags,

  1. apex:commandButton
  2. apex:commandLink
  3. apex:actionSupport
  4. apex:actionFunction


Where is the code ?

Here's the illustration for passing parameters for these four different action methods,



3 comments:

Thanks for reading my blog !