Search code examples
apache-flexflex4itemrenderer

How to pass events between an Itemrenderer and its parent


I have a spark list control whose data is rendered using an itemrenderer. Basically the Item renderer lays out the data within a Panel.

The Panel has a LinkButton, which when clicked needs to pass an Id to the parent application. In the parent application I have a function that dispatches a custom event to its parent. I want to know how to call this function from the ItemRenderer.

I tried using parentDocument.outerfunction etc but it throws an error..

Any clues ?


Solution

  • If you were using PureMVC, you could send a notification that the receiver would handle and perform the needed work. This is similar to firing a custom event and receiving it in the parent.