+ Start a Discussion
Sangeetha EmpoweredSangeetha Empowered 

lightning challenge trailhead

Refactor the input form for camping list items into its own component and communicate with messages.
Replace the HTML form in the campingList component with a new campingListFormcomponent that calls the submitForm controller action when clicked.
The campingList component handles a c:addItemEvent event with the actionhandleAddItem in the JavaScript controller. The handleAdditem method saves the record to the database and adds the record to the items value provider.
The addItemEvent event is of type component and has a Camping_Item__c type attribute named item.
The campingListForm registers an addItem event of type c:addItemEvent.
The campingListFormController JavaScript controller calls the helper's createItem method if the form is valid.
The campingListFormHelper JavaScript helper creates an addItem event with the item to be added and then fires the event. It then resets the newItem value provider with a blank sObjectType of type Camping_Item__c.

Need the code for the above challenge 
Richard DiNardoRichard DiNardo
Stuck on this one too. I followed all the expense stuff and everything is done except i cannot add the following line to my CampingList component
even though in the form I have registered created and fired the event all apparently successfully

    <aura:handler name="addItem" type="c:addItemEvent" action="{!c.handleAddItem}" />

but without being able to save this line ( a line just like I have in a working expense app) I cannot complete the challenge. I get this stupid error that makes no sense as the addItem event is registered firing and working properly

Failed to save undefined: aura:handler has invalid name attribute value: addItem

Did you get your answer Sangeetha?
Michael WhelanMichael Whelan
Richard check this forum out https://developer.salesforce.com/forums/?id=906F0000000kDPpIAM