I have an “edit bar” that I reuse for different data types. It has an edit, save and close buttons.
When the “save” button is hit, I want the parent item to save itself (make changes to database). It feels like custom events is the way to do this but I cannot figure it out.
I assume it would work this way:
- create a “saveItem” custom event (where should this be created)
- trigger the “saveItem” custom event from the edit bar
- watch this custom event from one of my item pages and perform save when it fires
I created the custom event from my item page and the actions are to save the item.
From my reusable element, I would think I could fire this custom event but it doesn’t show up as selectable