问题
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