I have created a navigation based application, so when the user clicks on a button, the page navigates to another page (with a back button on it)
In sencha touch how to programatically, go back (to the previous view in the navigation stack), and also erase the values contained in fields (in the previous view).
Update
Ext.getCmp('mainview').push({
xtype:'second'
});
In the Main.Js
Ext.define("app.view.Main", {
extend: 'Ext.navigation.View',
id:'mainview',
To go programatically back to the previous view in the navigation stack, you can use the method
pop(),on some button click handler.
To erase the values contained in the fields of the previous view(if it’s a
formpanel), you can use thereset()method onformpanellike this,This will reset all the values of your
formpanel.