Friday, June 16, 2017

apex:actionSupport with apex:param example.

1. Create apex class as below example.


/**
 * Controller class for actionSupport with passing parameter example.
 *
 **/
public with sharing class ActionSupportExamCtrl
{
 //Variable responsible for holding param value assigned in from VF.
 public String param1{get;set;}

 //action method called from actionFunction.
 public void method1(){
  System.debug('Parameter passed is '+ param1);
 }
}

2.Create VF as below example.

<apex:page  controller="ActionSupportExamCtrl">
<apex:form id="formId">
<!-- apex:actionSupport with apex:param -->
<apex:inputCheckbox>
   <apex:actionSupport action="{!method1}" event="onclick" rerender="formId">
<apex:param assignTo="{!param1}" name="prmNm" value="[ Your param value ]"/>
</apex:actionsupport>
</apex:inputCheckbox>
Click on checkbox to pass parameter from action support.
    </apex:form>
</apex:page>

Data Cloud Part 6: Practical (Ingest Physical Store's Customer details and Sales details)

Hope you have already created your Data Cloud Org and also downloaded the Customer's details and Sales details from previous posts.  Now...