Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: ItemRenderer and notification  (Read 8047 times)
amahi
Newbie
*
Posts: 4


View Profile Email
« on: July 17, 2008, 07:42:20 »

Hi, Can I someone you can help me for that:
How can I send An event from an ItemRenderer to my mediator?

I have a renderer like this:

:
<canvas>
<metadata>
[Event name="myevent" alias="myEventClass"]
</metadata>
<script>
private function onClick(e:Event) {
var event:myEventClass= new myEventClass();
event.data = myvo;
this.dispatch(event);
}
</script>
<my VO id="myvo">
<somecomponent click="onClick(event)"
</canvas>

This itemrenderer is used in a Datagrid
<datagrid itemrenderer="theoneiputthecodebefore" dataprovider="{myArrayOffmyVO}">

What I want to do is put my selected VO to my Mediator but my event  "myevent" is not accessible, so how can i do to notify my mediator about my selection?

 
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: July 17, 2008, 07:59:13 »

The event needs it's bubbles property set to true.

-=Cliff>
Logged
amahi
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: July 17, 2008, 08:37:31 »

Thank's That s work fine!
Logged
Pages: [1]
Print