Hello Andrew, your solution sounds correct.

Another way would possibly be to check the parent component (and its parent)
and manually set all 3 params in one go.


On Fri, Nov 7, 2008 at 1:00 PM, greenfishinwater <
[EMAIL PROTECTED]> wrote:

>   I have some view components with are used in a heirarchy:
>
> Application
> Store
> Department
> Product
>
> Each component only knows about itself, so the data passed to the
> product view only contains product data, and does not contain the
> department or store that the product is within.
>
> When a product is clicked I dispatch a custom event
> 'productSelectedEvent' giving the id of the product selected.
>
> What I also need is to have the department id and the store id, when
> the event bubbles up to the application.
>
> Is it appropriate to have an event listener on 'productSelectedEvent'
> in the department view that adds the current department id to the
> event, and then similarly in Store add the store id to
> 'productSelectedEvent'.
>
> The event 'productSelectedEvent' has 3 custom properties:
> productId
> departmentId
> storeId
>
> Thanks Andrew
>
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],

Reply via email to