子view调用父view的方法以及父view给子view传值
2013-04-17 18:13
429 查看
子view调用父view的方法,操作父view:
In parent controller:
In child controller define a global variable:
Then you can execute the ‘updateCustomerInfo(oData)’ method to change or modify the attribute about parent controller, just likein the parent controller.
父view给子view传值:
In parent controller:
In child controller define a global variable:
Then you can use the parentId in the beforRending function or other later functions.
In parent controller:
onBeforeRendering: function (oData) { var me = this; me.controllerCustomerDetail.updateCustomerInfo = function(oData) { me.byId('ctr_thingInspector').setFirstTitle(oData.customerName); me.byId('ctr_thingInspector').setSecondTitle(oData.businessType); }; },
In child controller define a global variable:
updateCustomerInfo: null,
Then you can execute the ‘updateCustomerInfo(oData)’ method to change or modify the attribute about parent controller, just likein the parent controller.
父view给子view传值:
In parent controller:
me.controllerCustomerDetail.parentID = "00001";
In child controller define a global variable:
parentID: null,
Then you can use the parentId in the beforRending function or other later functions.
相关文章推荐
- IOS修改webView背景透明以及IOS调用前台js的方法
- IOS修改webView背景透明以及IOS调用前台js的方法
- [置顶] 【Asp.net】前台的Html控件向后台传值以及前台的html的input按钮如何调用后台的方法
- native给weex页面传值以及Weex调用native方法(iOS端)
- Android实用方法— ViewPager + Fragment取消预加载以及Activity传值给Fragment
- 用户控件与父页面以及用户控件与用户控件的方法调用和传值
- android中webview携带cookie以及webview所加载网页中js调用java方法问题
- 关于ASP.NET同页面内【用户控件与父页面】以及【用户控件与用户控件】之间方法调用/传值
- 把一些view(子view)加到另一个view(父view)中后,将父view release,那么其中的子view会自动调用release方法嘛?
- Android实用方法— ViewPager + Fragment取消预加载以及Activity传值给Fragment
- 调用删除方法UITableView deleteRowsAtIndexPaths的时候就挂掉
- Android中WebView实现Javascript调用Java类方法
- viewcontroller页面间传值的几种方法
- Mac上添加环境变量的方法,以及conda命令无法调用的解决办法
- 在自定义控件的过程中犯下的错,在调用有三个参数的构造方法时this(context,null,0);第二个参数为空,在Activity中 findViewById找到对应的控件时
- [水晶报表]水晶报表创建以及调用方法
- JS两种声明函数的方法以及调用顺序
- 关于子类创 4000 建对象调用父类方法时this的问题(以及方法重写)
- SD模块重要的函数以及调用方法