Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call parent function from an itemRenderer

I want to call the parent function called "edit_groups()" from the itemRenderer. The code for my itemRenderer is:

<mx:VBox id="vbx_container" paddingBottom="4" paddingLeft="4" paddingRight="4" paddingTop="4" borderStyle="solid"
    dropShadowEnabled="true" width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <mx:Canvas width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
        <mx:Image id="image" width="100" height="100" source="{data.thumb}" scaleContent="true" maintainAspectRatio="true"
            complete="{image_smoothing_handler(event);}" trustContent="true" doubleClick="{CALL THE PARENT FUNCTION "edit_groups()"}"/>
    </mx:Canvas>
</mx:VBox>

And I call my itemRenderer from an application like:

list_groups_modify.itemRenderer=new ClassFactory(groups.list_groups_modify_item_renderer);

<mx:Label text="{data.label}" textAlign="center" maxWidth="60" toolTip="{data.label}"/>

Regards Zeeshan

like image 901
Zeeshan Rang Avatar asked Dec 17 '22 03:12

Zeeshan Rang


1 Answers

Try this, using parentDocument:

<mx:VBox id="vbx_container" paddingBottom="4" paddingLeft="4" paddingRight="4" paddingTop="4" borderStyle="solid"
    dropShadowEnabled="true" width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <mx:Canvas width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
        <mx:Image id="image" width="100" height="100" source="{data.thumb}" scaleContent="true" maintainAspectRatio="true"
            complete="{image_smoothing_handler(event);}" trustContent="true" doubleClick="parentDocument.edit_groups()"/>
    </mx:Canvas>
</mx:VBox>
like image 139
Nick Craver Avatar answered Dec 24 '22 12:12

Nick Craver