• Francesca Ribezzi 2
  • NEWBIE
  • 35 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 4
    Replies
Hi everyone,

I need to get the sum of all the child records associated with the parent. So, for each parent I need to get the sum of its children.
Mine is a custom object with a self lookup with the parent Id (and this is where the problems begin!!). 
How can I do this? I would rather not use triggers or lots of queries.. 
Thanks a lot for your help! 

Cheers
Francesca
Hello everyone! I am encountering some issues with feeds in Lightning Components: when I submit my form, the new feed values are showed below it but seem to replace the previous ones!! 
Can anyone help me, please?

Here's my code!

Thank you very much,

Francesca

 
//Commenti.cmp

<aura:component implements="force:hasRecordId" controller="CommentiController">
    <aura:attribute name="newComment" type="Commenti__c"/>
    <aura:attribute name="simpleNewComment" type="Commenti__c"    default="{ 'sobjectType': 'Commenti__c',
                                                                           'Name': '',
                                                                           'Username__c': '',
                                                                           'Feedback__c': ''
                                                                           }"/>
    

    <aura:attribute name="listaCommenti" type="Commenti__c[]"/>
     <aura:attribute name="newCommentError" type="String"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> 
    

    <force:recordData aura:id="commentRecordCreator"
                      
                      layoutType="FULL"
                      
                      targetRecord="{!v.newComment}"
                      
                      targetFields="{!v.simpleNewComment}"
                      
                      targetError="{!v.newCommentError}"
                      
                     mode="EDIT"
                   />    
    

    
    <div class="container">
        <h1 class="titolo">Lascia un Commento</h1>
        <div aria-labelledby="newexpenseform">
            
            <fieldset class="slds-box slds-theme--default slds-container--small">
                <legend id="newexpenseform" class="slds-text-heading--small 
                                                   slds-p-vertical--medium">
                    Give us a feedback! 
                </legend>
                
                
                <form class="slds-form--stacked">    
                    
                    <lightning:input aura:id="simpleNewCommentForm" label="Your Name"
                                     name="contactname"
                                     value="{!v.simpleNewComment.Name}"
                                     required="true"/> 
                    
                    <lightning:input aura:id="simpleNewCommentForm" label="Your Username"
                                     name="contactusername"
                                     value="{!v.simpleNewComment.Username__c}"
                                     required="true"/> 
                    
                    
                    <lightning:input aura:id="simpleNewCommentForm" label="Write your comment here"
                                     name="feedback"
                                     value="{!v.simpleNewComment.Feedback__c}"
                                     required="true"/> 
                    <lightning:button label="Submit!" 
                                      class="slds-m-top--medium"
                                      variant="brand"
                                      onclick="{!c.handleSaveContact}"/>
                </form>
            </fieldset>
        </div>
        
        
        <div class="slds-feed">
            
            <ul class="slds-feed__list">
                
                <aura:if isTrue="{! !empty(v.listaCommenti)}"> 
                <aura:iteration items="{!v.listaCommenti}" var="commento"> 
                    <li class="slds-feed__item">
                        <article class="slds-post">
                            <header class="slds-post__header slds-media">
                                <div class="slds-media__figure">
                                    <a href="javascript:void(0);" class="slds-avatar slds-avatar_circle slds-avatar_large">
                                <!--        <img alt="Immagine User" src="{!commento.User__r.BannerPhotoUrl}" title="Immagine User" /> -->
                                    </a>
                                </div>
                                <div class="slds-media__body">
                                    <div class="slds-grid slds-grid_align-spread slds-has-flexi-truncate">
                                        <p><a href="javascript:void(0);" title="Username">{!commento.Username__c}</a> — <a href="javascript:void(0);" title="Company Name">{!commento.User__c}</a></p>
                                        
                                    </div>
                                    <p class="slds-text-body_small"><a href="javascript:void(0);" title="Click for single-item view of this post" class="slds-text-link_reset">{!commento.CreatedDate}</a></p>
                                </div>
                            </header>
                            <div class="slds-post__content slds-text-longform">
                                <p>{!commento.Feedback__c}</p>
                            </div>
                            <footer class="slds-post__footer">
                                <ul class="slds-post__footer-actions-list slds-list_horizontal">
                                    
                                    <li class="slds-col slds-item slds-m-right_medium">
                                        <lightning:buttonIcon iconName="utility:success" alternativeText="Like"/>
                                    </li>
                                    <li class="slds-col slds-item slds-m-right_medium">
                                        
                                        <a href="javascript:void(0);" title="Comment"> Comment</a>
                                    </li>
                                    
                                    
                                </ul>
                                
                            </footer>
                        </article>
                        
                    </li>
                </aura:iteration> 
                    </aura:if>
            </ul>
        </div>  
        
    </div>            
</aura:component>
 
//CommentiController.js

({
    doInit: function(component, event, helper) {
        
        helper.getListaCommenti(component, event);
       helper.getNewRecord(component, event);
    },
    
    
    handleSaveContact: function(component, event, helper) {
        
        var userId = $A.get("$SObjectType.CurrentUser.Id");
        console.log("USERID: " + userId);

        var simpleNewComment =  component.get("v.simpleNewComment");
        component.set("v.simpleNewComment.User__c",userId);
        component.find("commentRecordCreator").saveRecord(function(saveResult) {
            if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
                
     
                var rec = component.get("v.newComment");
                
                var listaCommenti = component.get("v.listaCommenti");
                listaCommenti.push(rec);
                
                //   listaCommenti.unshift(recordData);
                component.set("v.listaCommenti", listaCommenti);
                console.log("record is saved successfully"+JSON.stringify(rec));
   

                console.log("SUCCESS "+ JSON.stringify(saveResult));
                
                       helper.getListaCommenti(component, event);
            } else if (saveResult.state === "INCOMPLETE") {
                // handle the incomplete state
                console.log("User is offline, device doesn't support drafts.");
            } else if (saveResult.state === "ERROR") {
                // handle the error state
                console.log('Problem saving contact, error: ' + JSON.stringify(saveResult.error));
            } else {
                console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error));
            }
        });
        
        
        helper.getNewRecord(component, event);
        
    },
 
//CommentiHelper.js

({

    getListaCommenti: function(component, event){
        var action = component.get("c.getCommenti");
        action.setCallback(this, function(a) {
            
            
            component.set("v.listaCommenti", a.getReturnValue());
            console.log("**"+a.getReturnValue());
        });
        $A.enqueueAction(action);
  
        
        
    },
    
     getNewRecord : function(component, event) {
        // Prepare a new record from template
        component.find("commentRecordCreator").getNewRecord(
            "Commenti__c", // sObject type (objectApiName)
            null,      // recordTypeId
            false,     // skip cache?
            $A.getCallback(function() {
                var rec = component.get("v.newComment");
                var error = component.get("v.newCommentError");
                if(error || (rec === null)) {
                    console.log("Error initializing record template: " + error);
                    return;
                }
                console.log("Record template initialized: " + rec.sobjectType);
            })
        );
    },
    
  
    
})

 

 
Hi guys, my  window.clearInterval  doesn't work properly in my code.. can anyone give me any explanation on this, please? Thank you very much!
I'd like it to stop counting when counter == oggetti. 
//Oggetti.cmp

<aura:attribute name="counter" type="Integer" default="0"/>
<aura:attribute name="setIntervalId" type="Integer"/>    
<aura:attribute name="oggettiLength" type="Integer"/>
    

 Collection : {!v.counter}
 
// OggettiController.js

({
    
     doInit : function(component, event, helper) {
         
		helper.getOggettiLength(component, event);
         
      
     },
 
//OggettiHelper.js

({
    
    getOggettiLength : function(component, event){
      
        var collezione = component.get("v.collezione");
        var action = component.get("c.getOggetti");
        action.setParams({ 
                          collezione : collezione});
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                
             var risultato = response.getReturnValue();
             console.log(JSON.stringify(response.getReturnValue()));
                console.log("RESPONSE " + risultato.length);
                component.set("v.oggettiLength", response.getReturnValue());   
                
         		this.onInterval(component, event);
                var storeResponse = response.getReturnValue();
     
                if (storeResponse.length == 0) {
                 
                } else {
                 
                }......


},

onInterval : function(component, event){

        var oggettiLength = component.get("v.oggettiLength");

        var i = 0;
        var interval = window.setInterval(
            $A.getCallback(function() {
                
                var value = i++;
       
                component.set("v.counter", value);
                var oggetti= component.get("v.oggettiLength");
                var counter= component.get("v.counter");
                if(counter == oggetti){
   
                    window.clearInterval(component.get("v.setIntervalId"));
                     
                }
                
            }), 1000
        );   
        
        
        component.set("v.setIntervalId", interval) ; 
       
        
    },

 
Hi everyone,

I don't get why my sala in console.log sala.Name results "undefined". 
Can anyone sort this out, please? 

Thank you! :-)
 
<aura:attribute name="sale" type="Sala__c[]"/>
    <aura:attribute name="sala" type="Sala__c"/>

<aura:iteration items="{!v.sale}" var="sala">
                                        <li  class="slds-dropdown__item" role="presentation">
                                            <a href="javascript:void(0);" role="menuitem" tabindex="-1">
                                                <span id="{!sala}" style="color: black;" class="slds-truncate" title="{!sala.Name}" onclick="{!c.onChange}" >  
                                                    {!sala.Name}
                                                </span>
                                            </a>
                                        </li>
                                    </aura:iteration>  


    onChange : function(component, event, helper){

        var sala = event.target.id; 
        component.set("v.sala", sala);
     console.log("sala " + sala.Name);
   
...

 
Hi Guys! I've been trying really hard to sort this out but i can't! As soon as I hover my mouse upon "Menu Item", the list items contained in <aura:iteration> align horizontally to each other instead of vertically.
Can anyone help me with this?
Thank you so much :-)
<nav class="slds-context-bar__secondary" role="navigation">
                <ul class="slds-grid">
                    <li class="slds-context-bar__item">
                  
                    </li>
                    
        
                    <li  class="slds-context-bar__item slds-context-bar__dropdown-trigger slds-dropdown-trigger slds-dropdown-trigger_hover">
                        <a href="javascript:void(0);" class="slds-context-bar__label-action" title="Menu Item">
                            <span class="slds-truncate" title="Menu Item">Menu Item</span>
                        </a>
                        <div class="slds-context-bar__icon-action slds-p-left_none">

                        </div>
                        <div class="slds-dropdown slds-dropdown_right">
                            <ul class="slds-dropdown__list" role="menu">
                                <li class="slds-dropdown__item" role="presentation">
                                    <a href="javascript:void(0);" role="menuitem" tabindex="-1">
                                        
                                    </a>
                                </li>
                                
                                <li class="slds-dropdown__item" role="presentation">
                                    <a href="javascript:void(0);" role="menuitem" tabindex="-1">
                                        <span style="color: black;text-decoration-color: blak;" class="slds-truncate" title="Menu Item One">
                                            <aura:iteration items="{!v.sale}" var="sala">
                                                {!sala.Name}
                                            </aura:iteration></span>
                                    </a>
                                </li>

 
Hi everyone,
I'm getting this error at Step 6: "The BoatDetails component must use force:recordData to load the appropriate list of fields from Boat__c into the boat attribute of the component."

I believe it's because my "auraMethodResult" happens to be undefined for some reason.. Can anyone help me with this, please? Thank you so much :-)
BoatSearch:
<aura:handler name="formsubmit" event="c:FormSubmit" action="{!c.onFormSubmit}"  phase="capture"/>
   
 
    <div>
    <lightning:card class="findBoatCard" title="Find a Boat">
        <c:BoatSearchForm />    
    </lightning:card>     
    </div>
    
    <lightning:card title="Matching Boats">
        <c:BoatSearchResults aura:id="child"/>
    </lightning:card>
</aura:component>


BoatSearchController:
({

    onFormSubmit : function(component, event, helper){
 
        var formData = event.getParam("formData");
        var boatTypeId = formData.boatTypeId;
        var child = component.find("child");
        var auraMethodResult = child.search(boatTypeId);
        console.log("auraMethodResult: " + auraMethodResult);
    },

})

BoatSearchResults:
 	<aura:attribute name="boat" type="BoatType__c"/> 
    <aura:attribute name="boats" type="Boat__c[]"/> 
    <aura:attribute name="selectedBoatId" type="Object"/> 
    
<aura:handler name="boatClickEvent" event="c:BoatSelect" action="{!c.onBoatSelect}" />

    <aura:method name="search" action="{!c.doSearch}"> 
        <aura:attribute name="boatTypeId" type="Object" /> 
    </aura:method>
    
<lightning:layout multipleRows="true" horizontalAlign="center">

    <aura:iteration items="{!v.boats}" var="boat"> 
        <lightning:layoutItem   flexibility="grow" class="slds-m-right_small" >   
        
                <c:BoatTile boat="{!boat}" selected="{! boat.Id == v.selectedBoatId ? true : false }"/> 
            
        </lightning:layoutItem>
    </aura:iteration>

    
    <aura:if isTrue="{! empty(v.boats)}"> 
        <lightning:layoutItem class="slds-align_absolute-center" flexibility="auto" padding="around-small">   
            <ui:outputText value="No boats found" />
        </lightning:layoutItem>
 
    </aura:if>
    
    </lightning:layout>

BoatSearchResultsController:
({
	doSearch : function(component, event, helper) {
      
        var params = event.getParam('arguments');
        
        component.set("v.boatTypeId", params.boatTypeId);
        helper.onSearch(component);
     
    },
    
    onBoatSelect: function(component, event, helper){
        var selectedBoatId = event.getParam('boatId');
        component.set("v.selectedBoatId", selectedBoatId);
    }
})
 
BoatTile
	<aura:attribute name="boat" type="Boat__c"/> 
    <aura:attribute name="selected" type="Boolean" default="false"/> 

      <aura:registerEvent name="boatClickEvent" type="c:BoatSelect"/>
     <aura:registerEvent name="boatSelected" type="c:BoatSelected"/>
    

    
    <lightning:button aura:id="boatTileButton" class="{!v.selected == 'true' ? 'tile selected' : 'tile'}" onclick="{!c.onBoatClick}">
        <div style="{! 'background-image:url(\'' + v.boat.Picture__c + '\'); '}" class="innertile">
            
            <div class="lower-third">
                <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>

            </div>
        </div>
    </lightning:button>  
BoatTileController:

({
    onBoatClick : function(component, event, helper) {
      
       var boatType = component.get("v.boat");
        console.log('Boat asd'+boatType);
        var boatSelectEvt = component.getEvent("boatClickEvent");
        boatSelectEvt.setParams({"boatId" :boatType.Id});
        boatSelectEvt.fire();
        
 
        var appEvent = $A.get("e.c:BoatSelected");
        var boat = component.get("v.boat");  
        appEvent.setParams({
            "boat": boat
        });
        appEvent.fire();    
     }
})

 
Hello everyone! I am encountering some issues with feeds in Lightning Components: when I submit my form, the new feed values are showed below it but seem to replace the previous ones!! 
Can anyone help me, please?

Here's my code!

Thank you very much,

Francesca

 
//Commenti.cmp

<aura:component implements="force:hasRecordId" controller="CommentiController">
    <aura:attribute name="newComment" type="Commenti__c"/>
    <aura:attribute name="simpleNewComment" type="Commenti__c"    default="{ 'sobjectType': 'Commenti__c',
                                                                           'Name': '',
                                                                           'Username__c': '',
                                                                           'Feedback__c': ''
                                                                           }"/>
    

    <aura:attribute name="listaCommenti" type="Commenti__c[]"/>
     <aura:attribute name="newCommentError" type="String"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> 
    

    <force:recordData aura:id="commentRecordCreator"
                      
                      layoutType="FULL"
                      
                      targetRecord="{!v.newComment}"
                      
                      targetFields="{!v.simpleNewComment}"
                      
                      targetError="{!v.newCommentError}"
                      
                     mode="EDIT"
                   />    
    

    
    <div class="container">
        <h1 class="titolo">Lascia un Commento</h1>
        <div aria-labelledby="newexpenseform">
            
            <fieldset class="slds-box slds-theme--default slds-container--small">
                <legend id="newexpenseform" class="slds-text-heading--small 
                                                   slds-p-vertical--medium">
                    Give us a feedback! 
                </legend>
                
                
                <form class="slds-form--stacked">    
                    
                    <lightning:input aura:id="simpleNewCommentForm" label="Your Name"
                                     name="contactname"
                                     value="{!v.simpleNewComment.Name}"
                                     required="true"/> 
                    
                    <lightning:input aura:id="simpleNewCommentForm" label="Your Username"
                                     name="contactusername"
                                     value="{!v.simpleNewComment.Username__c}"
                                     required="true"/> 
                    
                    
                    <lightning:input aura:id="simpleNewCommentForm" label="Write your comment here"
                                     name="feedback"
                                     value="{!v.simpleNewComment.Feedback__c}"
                                     required="true"/> 
                    <lightning:button label="Submit!" 
                                      class="slds-m-top--medium"
                                      variant="brand"
                                      onclick="{!c.handleSaveContact}"/>
                </form>
            </fieldset>
        </div>
        
        
        <div class="slds-feed">
            
            <ul class="slds-feed__list">
                
                <aura:if isTrue="{! !empty(v.listaCommenti)}"> 
                <aura:iteration items="{!v.listaCommenti}" var="commento"> 
                    <li class="slds-feed__item">
                        <article class="slds-post">
                            <header class="slds-post__header slds-media">
                                <div class="slds-media__figure">
                                    <a href="javascript:void(0);" class="slds-avatar slds-avatar_circle slds-avatar_large">
                                <!--        <img alt="Immagine User" src="{!commento.User__r.BannerPhotoUrl}" title="Immagine User" /> -->
                                    </a>
                                </div>
                                <div class="slds-media__body">
                                    <div class="slds-grid slds-grid_align-spread slds-has-flexi-truncate">
                                        <p><a href="javascript:void(0);" title="Username">{!commento.Username__c}</a> — <a href="javascript:void(0);" title="Company Name">{!commento.User__c}</a></p>
                                        
                                    </div>
                                    <p class="slds-text-body_small"><a href="javascript:void(0);" title="Click for single-item view of this post" class="slds-text-link_reset">{!commento.CreatedDate}</a></p>
                                </div>
                            </header>
                            <div class="slds-post__content slds-text-longform">
                                <p>{!commento.Feedback__c}</p>
                            </div>
                            <footer class="slds-post__footer">
                                <ul class="slds-post__footer-actions-list slds-list_horizontal">
                                    
                                    <li class="slds-col slds-item slds-m-right_medium">
                                        <lightning:buttonIcon iconName="utility:success" alternativeText="Like"/>
                                    </li>
                                    <li class="slds-col slds-item slds-m-right_medium">
                                        
                                        <a href="javascript:void(0);" title="Comment"> Comment</a>
                                    </li>
                                    
                                    
                                </ul>
                                
                            </footer>
                        </article>
                        
                    </li>
                </aura:iteration> 
                    </aura:if>
            </ul>
        </div>  
        
    </div>            
</aura:component>
 
//CommentiController.js

({
    doInit: function(component, event, helper) {
        
        helper.getListaCommenti(component, event);
       helper.getNewRecord(component, event);
    },
    
    
    handleSaveContact: function(component, event, helper) {
        
        var userId = $A.get("$SObjectType.CurrentUser.Id");
        console.log("USERID: " + userId);

        var simpleNewComment =  component.get("v.simpleNewComment");
        component.set("v.simpleNewComment.User__c",userId);
        component.find("commentRecordCreator").saveRecord(function(saveResult) {
            if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
                
     
                var rec = component.get("v.newComment");
                
                var listaCommenti = component.get("v.listaCommenti");
                listaCommenti.push(rec);
                
                //   listaCommenti.unshift(recordData);
                component.set("v.listaCommenti", listaCommenti);
                console.log("record is saved successfully"+JSON.stringify(rec));
   

                console.log("SUCCESS "+ JSON.stringify(saveResult));
                
                       helper.getListaCommenti(component, event);
            } else if (saveResult.state === "INCOMPLETE") {
                // handle the incomplete state
                console.log("User is offline, device doesn't support drafts.");
            } else if (saveResult.state === "ERROR") {
                // handle the error state
                console.log('Problem saving contact, error: ' + JSON.stringify(saveResult.error));
            } else {
                console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error));
            }
        });
        
        
        helper.getNewRecord(component, event);
        
    },
 
//CommentiHelper.js

({

    getListaCommenti: function(component, event){
        var action = component.get("c.getCommenti");
        action.setCallback(this, function(a) {
            
            
            component.set("v.listaCommenti", a.getReturnValue());
            console.log("**"+a.getReturnValue());
        });
        $A.enqueueAction(action);
  
        
        
    },
    
     getNewRecord : function(component, event) {
        // Prepare a new record from template
        component.find("commentRecordCreator").getNewRecord(
            "Commenti__c", // sObject type (objectApiName)
            null,      // recordTypeId
            false,     // skip cache?
            $A.getCallback(function() {
                var rec = component.get("v.newComment");
                var error = component.get("v.newCommentError");
                if(error || (rec === null)) {
                    console.log("Error initializing record template: " + error);
                    return;
                }
                console.log("Record template initialized: " + rec.sobjectType);
            })
        );
    },
    
  
    
})

 

 
Hi guys, my  window.clearInterval  doesn't work properly in my code.. can anyone give me any explanation on this, please? Thank you very much!
I'd like it to stop counting when counter == oggetti. 
//Oggetti.cmp

<aura:attribute name="counter" type="Integer" default="0"/>
<aura:attribute name="setIntervalId" type="Integer"/>    
<aura:attribute name="oggettiLength" type="Integer"/>
    

 Collection : {!v.counter}
 
// OggettiController.js

({
    
     doInit : function(component, event, helper) {
         
		helper.getOggettiLength(component, event);
         
      
     },
 
//OggettiHelper.js

({
    
    getOggettiLength : function(component, event){
      
        var collezione = component.get("v.collezione");
        var action = component.get("c.getOggetti");
        action.setParams({ 
                          collezione : collezione});
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                
             var risultato = response.getReturnValue();
             console.log(JSON.stringify(response.getReturnValue()));
                console.log("RESPONSE " + risultato.length);
                component.set("v.oggettiLength", response.getReturnValue());   
                
         		this.onInterval(component, event);
                var storeResponse = response.getReturnValue();
     
                if (storeResponse.length == 0) {
                 
                } else {
                 
                }......


},

onInterval : function(component, event){

        var oggettiLength = component.get("v.oggettiLength");

        var i = 0;
        var interval = window.setInterval(
            $A.getCallback(function() {
                
                var value = i++;
       
                component.set("v.counter", value);
                var oggetti= component.get("v.oggettiLength");
                var counter= component.get("v.counter");
                if(counter == oggetti){
   
                    window.clearInterval(component.get("v.setIntervalId"));
                     
                }
                
            }), 1000
        );   
        
        
        component.set("v.setIntervalId", interval) ; 
       
        
    },

 
Hi everyone,

I don't get why my sala in console.log sala.Name results "undefined". 
Can anyone sort this out, please? 

Thank you! :-)
 
<aura:attribute name="sale" type="Sala__c[]"/>
    <aura:attribute name="sala" type="Sala__c"/>

<aura:iteration items="{!v.sale}" var="sala">
                                        <li  class="slds-dropdown__item" role="presentation">
                                            <a href="javascript:void(0);" role="menuitem" tabindex="-1">
                                                <span id="{!sala}" style="color: black;" class="slds-truncate" title="{!sala.Name}" onclick="{!c.onChange}" >  
                                                    {!sala.Name}
                                                </span>
                                            </a>
                                        </li>
                                    </aura:iteration>  


    onChange : function(component, event, helper){

        var sala = event.target.id; 
        component.set("v.sala", sala);
     console.log("sala " + sala.Name);
   
...

 
Hi Guys! I've been trying really hard to sort this out but i can't! As soon as I hover my mouse upon "Menu Item", the list items contained in <aura:iteration> align horizontally to each other instead of vertically.
Can anyone help me with this?
Thank you so much :-)
<nav class="slds-context-bar__secondary" role="navigation">
                <ul class="slds-grid">
                    <li class="slds-context-bar__item">
                  
                    </li>
                    
        
                    <li  class="slds-context-bar__item slds-context-bar__dropdown-trigger slds-dropdown-trigger slds-dropdown-trigger_hover">
                        <a href="javascript:void(0);" class="slds-context-bar__label-action" title="Menu Item">
                            <span class="slds-truncate" title="Menu Item">Menu Item</span>
                        </a>
                        <div class="slds-context-bar__icon-action slds-p-left_none">

                        </div>
                        <div class="slds-dropdown slds-dropdown_right">
                            <ul class="slds-dropdown__list" role="menu">
                                <li class="slds-dropdown__item" role="presentation">
                                    <a href="javascript:void(0);" role="menuitem" tabindex="-1">
                                        
                                    </a>
                                </li>
                                
                                <li class="slds-dropdown__item" role="presentation">
                                    <a href="javascript:void(0);" role="menuitem" tabindex="-1">
                                        <span style="color: black;text-decoration-color: blak;" class="slds-truncate" title="Menu Item One">
                                            <aura:iteration items="{!v.sale}" var="sala">
                                                {!sala.Name}
                                            </aura:iteration></span>
                                    </a>
                                </li>