extjs - 如何从sencha touch中的导航堆栈中删除特定 View ?

标签 extjs navigation sencha-touch sencha-touch-2

我正在插入这样的观点 this.up('navView').push({xtype: 'myView'})
如何删除位于导航堆栈中间的特定 View ?

至少我应该摆脱这个警告

[WARN][Ext.Component#constructor] Registering a component with a id (listxyz) which has already been used. Please ensure the existing component has been destroyed (Ext.Component#destroy().

最佳答案

在推送 View 检查天气之前, View 已经存在,如果它已经存在,则将其销毁,因此您不会收到这些警告并且可以轻松导航。

if(Ext.getCmp('myView')){
                Ext.getCmp('myView').destroy();
}

//Push myView

where  myView should be the id of that view declared in config of that view


    config: {

        id:'myView',

    }

关于extjs - 如何从sencha touch中的导航堆栈中删除特定 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15873514/

相关文章:

javascript - 使用 ExtJS 检查单选按钮

windows-phone-7 - 如何为页面中的每个 UI 元素应用旋转门效果

sencha-touch - Sencha Touch 过滤器由商店提供

css - 用户向下滚动时扩展和更改导航栏

html - 具有 float 左右元素的无序列表导航

slide - Sencha Touch 幻灯片

android - 在 Phonegap/Sencha Touch 中以编程方式使麦克风静音

storage - Sencha 多店一店实例

javascript - ExtJs:最佳列表组件?网格的功能太多了

javascript - 关于 Extjs afterLayout