posts - 325,  comments - 25,  trackbacks - 0

 

弹出子窗口代码:

protected function addBtn_clickHandler(event:MouseEvent):void
   {
    var addInfoWin:RInfoPanel = RInfoPanel(PopUpManager.createPopUp(this,RInfoPanel,true));
    addInfoWin.mainApp = this;
    //调用回调函数。用来刷新父窗口。
    addInfoWin.callBackFunction = init;//init是父窗口的初始化程序。调用它用来刷新父窗口数据
    addInfoWin.isPopUp = true;
    PopUpManager.centerPopUp(addInfoWin);
    
   }

子窗口回调函数访问父窗口

[Bindable]
   public var callBackFunction:Function;//回调函数
   [Bindable]
   public var mainApp:Object = null;

if(effectRows == 1)
    {
     Alert.show("添加成功!");
     
     PopUpManager.removePopUp(this);
     callBackFunction.call(mainApp); //回调函数。也可传递参数。
    }

posted on 2011-04-15 11:24 长春语林科技 阅读(1360) 评论(0)  编辑  收藏 所属分类: flex

只有注册用户登录后才能发表评论。


网站导航:
 
<2011年4月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

 

长春语林科技欢迎您!

常用链接

留言簿(6)

随笔分类

随笔档案

文章分类

文章档案

相册

收藏夹

搜索

  •  

最新评论

阅读排行榜

评论排行榜