Alex,

Could you be more specific?  'Listen' ala .addEventListener?  If so
does that mean Main dispatches a new/different event than AppMenuEvent?

For the record my current implementation is a AppMenuDispatcher
singleton (built at the top of the component tree) that
accepts/registers listeners, and fires the listeners menuEvent()
method when it receives an AppMenuEvent.

Thanks in advanced.

--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Form should listen to main for the event.
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of ron_mori
> Sent: Monday, August 18, 2008 4:08 PM
> To: [email protected]
> Subject: [flexcoders] Re: Event Propagation
> 
>  
> 
> Let me clarify my component tree
> My application component tree is roughly:
> 
> App
> 1 main container
> 1.1 header container (1st sub-container in main)
> 1.1.1 menu component 
> 1.2 body container (2nd sub-container in main)
> 1.2.1 form component
> 
> Then the user action / event response.
> 1. User selects 'Save' from menu.
> 2. Menu fires AppMenuEvent type doValidation.
> 
> I want the form to react to the event and validate the form.
> 
> The form has registered as a listener for the event, but since that
> component is parallel on the application component tree to the menu
> component, the event propagation that bubbles UP that component tree
> will not reach the form.
> 
> I think the other suggestion is the way to go: have the common parent
> component (in my case the 'main container') listen for the
> AppMenuEvent, then react by calling the validation method in the form.
> This will require some chain of methods to reach down to the form -
> body container has validate() method to call the form component
> validate() method.
> 
> A bit kludge when you have a number of components to work down through
> to get to the form validation method, but it's the only idea I have so
> far.
> 
> other suggestions are welcome.
> thanks.
>


Reply via email to