Dynamic Binding Salesforce Lightning Component

Lightning, Lightning Component, Salesforce Lightning

Welcome back All, here we will learn about the dynamic field of Lightning Component. As Most of you must be aware of that In Lightning, Component Dynamic component is not available. Recently I was working on one of my projects and implemented the Dynamic binding using the lightning component so I am going to share how I implemented the same so that it may help others.

As we all know that we can use the Dynamic Binding in the VisualForce page but in Lightning Component it is not Possible. 

In this example, We will show the list of Objects in a picklist and when user will select any object it will dynamically show the TOP 15 records in a table.



Step1 – Create Apex Class


Step2 – Create the Lightning Component


See the comments into the component.

Step3: – Click on Controller from the right and paste the below code for Controller Javascript


[codesyntax lang=”javascript” container=”div” doclinks=”1″]
    doInit : function(component, event, helper) {
        helper.onInit(component, event, helper);
    doHandleChange : function(component, event, helper) {
        helper.onHandleChange(component, event, helper);


Step4: – Click on Helper from the right and paste the below code for Helper Javascript


See the comments.

Step5: – Create Lightning Application


[codesyntax lang=”xml” container=”div” doclinks=”1″]
<aura:application access="Global" extends="force:slds" >
	<c:DynamicBindingDemo />


Click on Preview to see the output of the component.

Happy learning 🙂

Sharing is caring 🙂 😉



Complete Code




Leave a Reply