Skip to main content
2 of 3
added 8 characters in body
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

Display Wrapper in lightning component salesforce

I have an apex class as below with a wrapper:

public class lightningController{
    public class ContactWrappertest{
    @AuraEnabled
    public boolean checked {get; set;}
    @AuraEnabled
    public Contact cont {get; set;}
    
    public ContactWrappertest(Boolean isChecked, Contact c){
        this.checked = isChecked;
        this.cont = c;
    }
}

Now when i try to create a lightning component attribute as below and save it:

I get below error on Save: Failed to save lightningComponent.cmp: Invalid aura:attribute type: ContactWrappertest[]: Source

Can someone help me understand the issue here and try to resolve it?

Shrey
  • 151
  • 1
  • 3
  • 10