function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sree SalesforceSree Salesforce 

Lightning Issue: I have given attribute like this <aura:attribute name="lstPositions" type="DynamicAccountController.AccountWrapper[]" />

Am I  create list on  The attribute Like that
I am getting this error.
User-added image

When i  hide the attrbute on component. This alert is not showing.

public class DynamicAccountController {
public static List<DynamicAccountController.AccountWrapper> GetAccountNames()
    List<DynamicAccountController.AccountWrapper> accountlist =new List<DynamicAccountController.AccountWrapper>();
    list<account> lstPositions=[select id,name from account limit 10];
    for(account ac:lstPositions)
        accountlist.add(new AccountWrapper(ac));
    return accountlist;
    public class AccountWrapper{
        @AuraEnabled public account acc{get;set;}
        @AuraEnabled public boolean selected{get;set;}
        public AccountWrapper(account accs){