How to pass data among the screens in sencha touch2.0?

﹥>﹥吖頭↗ 提交于 2019-12-19 10:53:35

问题


I am working on sencha touch2.0 app and I want to send data from one screen to another. I know this question has already been asked here but I don't find it helpful so I am asking it here again.

I have a checkbox listview in my app and what I want is that when I click on one or more checkboxes and go to next screen, I will get all the 'checked' list items here, means I want to send checked list items data from one screen to another. From my research on net I came to know, this can be done by dispatch() method http://docs.sencha.com/touch/2-0/#!/api/Ext.app.Application-method-dispatch. But I don't how to do it. So, please provide me any suggestion/solution to get rid of these problem.


回答1:


Ext.dispatch() is deprecated in Sencha Touch 2.0 because of the fact that you can always call any method of any controller at anytime you want through this, right in your views:

yourAppName.getApplication().getController.method(params)

Or even further, you can make it automatic through refs and controls in your controller.



来源:https://stackoverflow.com/questions/10580984/how-to-pass-data-among-the-screens-in-sencha-touch2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!