wrapper class sample

How to Use Wrapper Class In Lightning Component -Inner Class Example

Lightning Component

Hi Guys, Today In this post we are going to learn about how to Use wrapper class or Inner Class in salesforce lightning component OR how to display data from wrapper class in lightning component.

In this sample example we are create a lightning component, and display standard object contact records and other data using wrapper class properties.

Using Wrapper Class In Lightning Component Example :
Lightning Component Output:wrapper class
Lightning Component Output:

Apex class Controller [Include Wrapper/Inner class].

  • To access apex[wrapper ] class properties in Lightning Component you have need to make them @AuraEnabled.
  • see code comments

Lightning Component [testWrapper.cmp]

  • see code comments

javaScript Controller [testWrapperController.js]

  • see code comments
demo.app [Lightning Application]

Lightning Component Output: wrapper class
Lightning Component Output:

Like our facebook page for new post updates. & Don’t forget to bookmark this site for your future reference.

if you have any suggestions or issue with it, you can post in comment box 🙂

(Visited 16,765 times, 1 visits today)

11 comments

Leave a Reply