You need to sign in to do that
Don't have an account?
Manoj Goswami 5
I am stuck in Connect Components with Events Trailhead challange. please HELP !!!
I have trield almost every code and solution from forum still stuck into this challange.
Challange :
Refactor Components and Communicate with Events
Refactor the input form for camping list items into its own component and communicate with component events.
Replace the HTML form in the campingList component with a new campingListForm component that calls the clickCreateItem JavaScript controller action when clicked.
The campingList component listens for a c:addItemEvent event and executes the action handleAddItem 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.
I am not pasting entire code as it is too lengthy.
I am trying from past 2 days, many hours ... still no luck.
Tried with every possible solution from Forum and StackExchange tried with fresh Trailhead Org, nothing worked.
with each try .. getting new errors.
Can someone please try the solution in their system and provide it in the comment ssection. That would be a great help.
Thanks in advance,
Manoj
Challange :
Refactor Components and Communicate with Events
Refactor the input form for camping list items into its own component and communicate with component events.
Replace the HTML form in the campingList component with a new campingListForm component that calls the clickCreateItem JavaScript controller action when clicked.
The campingList component listens for a c:addItemEvent event and executes the action handleAddItem 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.
I am not pasting entire code as it is too lengthy.
I am trying from past 2 days, many hours ... still no luck.
Tried with every possible solution from Forum and StackExchange tried with fresh Trailhead Org, nothing worked.
with each try .. getting new errors.
Can someone please try the solution in their system and provide it in the comment ssection. That would be a great help.
Thanks in advance,
Manoj
Mark as best answer, If it resloves !!
(1) campingList Component
(2) campingListController
(3) campingList Helper
(4) campingListForm component
(5) campingListForm Controller
(6) campingListForm Helper (7) addItemEvent.evt
please follow same instruction again in New trailhead playground you can able to acheive it.
Mark as resloved if it helps :) :)
Thanks,
Bhanu Prakash
visit ForceLearn.com
All Answers
Mark as best answer, If it resloves !!
(1) campingList Component
(2) campingListController
(3) campingList Helper
(4) campingListForm component
(5) campingListForm Controller
(6) campingListForm Helper (7) addItemEvent.evt
please follow same instruction again in New trailhead playground you can able to acheive it.
Mark as resloved if it helps :) :)
Thanks,
Bhanu Prakash
visit ForceLearn.com
Can you help me with this one also -- > https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005cWBQAY
Thanks in advance.
The campingList component appears to be using UI Components instead of Base Lightning Components in the form. You should be using only Base Lightning Components.
Solution provided by bhanu_prakash is correct. You just need to make few changes in campingList Component & CampingListForm. You can copy all the design elements proposed by bhanu. And use below elements for campingList Component & campingListForm. I hope it would fix the issue which you have reported.
1. campingList Component 2.CampingListForm
@bhanu_prakash
please help me to resolve this issue
The campingList component appears to be using UI Components instead of Base Lightning Components in the form. You should be using only Base Lightning Components.