[英]How to navigate to another view when i tapped a button in Sencha touch
I am developing a Sencha touch application Can anyone please tell me how to navigate to another view when i tapped a button, also have to send a value to the specified view. 我正在开发一个Sencha触摸应用程序,谁能告诉我点击按钮时如何导航到另一个视图,还必须将值发送到指定的视图。 Thank You!
谢谢!
There are a few ways to navigate from one view to another. 有几种方法可以从一个视图导航到另一个视图。 Please look at the below link and read the accepted answer.
请查看以下链接并阅读接受的答案。
How to switch a view container using Sencha Touch? 如何使用Sencha Touch切换视图容器?
You can also use Navigation view in Sencha to navigate from one to another: 您还可以使用Sencha中的“导航”视图从一个导航到另一个:
http://try.sencha.com/touch/2.0.0/docs/Ext.navigation.View.1/viewer.html http://try.sencha.com/touch/2.0.0/docs/Ext.navigation.View.1/viewer.html
And if you want to pass a value from one view to another. 如果要将值从一个视图传递到另一个视图。 For example, you want to send the value from a text field to other page's HTML.
例如,您要将值从文本字段发送到其他页面的HTML。 You can write something like this:
您可以这样写:
Ext.getCmp('ID OF THE SECOND VIEW').setHtml(Ext.getCmp('ID OF THE TEXT FIELD ').getValue());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.