a FIELD_INTEGRITY_EXCEPTION is raised when i try to save my lightning component. I found the cause but not the solution.
In the following code, look at the aura:handler
:
.cmp
<div id="list" class="row">
<div class="container">
<!--<div class="inner">-->
<aura:iteration items="{!v.products}" var="prod">
<aura:handler name="init" action="{!c.doAction}" value="{!this}"/>
<div class="info">
<p>Nom: <ui:outputText value="{!prod.Name}"/></p>
<p>Liké par: <ui:outputText value="{!prod.wishedBy__c}"/></p>
<p>Prix: <ui:outputCurrency value="{!prod.Prix__c}"/></p>
</div>
<div id="side"></div>
</aura:iteration>
<!--</div>-->
</div>
</div>
the aura:handler
do this error. When i place it outside the div class="row"
, before or after, it works. console.log from doAction
are displayed in the console browser.
I need to call this method into the iteration to get value from my table.
The full error message :
FIELD_INTEGRITY_EXCEPTION
Failed to save undefined:markup://c:pageGraph:19,87: Invalid attribute "name": Source
the code next to the error and the apex class works fine, contents like <p>Nom: <ui:outputText value="{!prod.Name}"/></p>
and the others are displayed when i remove aura:handler
from the div
How to fix it ?