Skip to main content
added 17 characters in body
Source Link
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

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:

 
<aura:component controller="lightningController" implements="force:appHostable" access="global">
    <aura:attribute name="weekWrapList" type= "lightningController.ContactWrappertest[]"/>
 </aura:component>

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?

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?

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:

<aura:component controller="lightningController" implements="force:appHostable" access="global">
    <aura:attribute name="weekWrapList" type= "lightningController.ContactWrappertest[]"/>
 </aura:component>

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?

added 8 characters in body
Source Link
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

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 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?

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?

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?

Source Link
Shrey
  • 151
  • 1
  • 3
  • 10

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?