I have a Flex MXML navigation component with a couple of simple buttons inside, that has a mediator.
There are two options:
Setup event listeners for the buttons inside the MXML component and dispatch custom events for the mediator to be picked up.
Add event listeners inside the mediator, directly on the buttons inside the MXML component.
Like this: mainMenu.mainMenuButtonHelp.addEventListener(MouseEvent.CLICK, onHelpButtonClicked);
Does it break the view components encapsulation if I register for events from inside the mediator ?
It seems a bit redundant to dispatch custom events in the MXML component and then listen for those events inside the mediator.