I am working on a reusable component that will be used multiple times throughout the application. I need the ID field that is produced by this component to have a unique value.

Example Code

Inside of my lightning view I have a id field,

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global">

<div id="{!v.wordCloudId}"></div>


Inside of my controller I am trying to set the value of that field,

component.set('v.wordCloudId', id);


Access Check Failed! AttributeSet.get(): attribute 'wordCloudId' of component 'markup://c:DP_Word_Cloud {266:556;a}' is not visible to 'markup://c:DP_Word_Cloud {266:556;a}'.


I have set values like this in other places in this application. Why is it not working here and how do I fix it?


You need to declare wordCloudId first and then you can set it.

<aura:attribute name="wordCloudId" type="Id" />
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.