Sencha:在Sheet.hide之后防止取消屏蔽

时间:2012-02-15 21:28:30

标签: sencha-touch

我在解雇工作表后执行AJAX调用。问题是当幻灯片转换完成时,Sencha取消屏蔽正文,但AJAX请求可能仍在运行。如何防止揭露?

doSearch: function() {
    this.hide();

    // the controller handles this and tells the store to
    // load the data from an AJAX proxy
    this.fireEvent('search', ...);
}

感谢。

1 个答案:

答案 0 :(得分:0)

不幸的是,没有简单的方法可以做到这一点。它深深地融入了布局系统,试图阻止它会导致一堆掩盖问题。

如果您使用的是Sencha Touch 2,在您的doSearch方法中,您可以在隐藏工作表后立即屏蔽容器,因此看起来掩模从未消失。

this.getParent().setMasked(true);

当AJAX回调完成时:

this.getParent().setMasked(false);

如果要屏蔽整个屏幕,也可以屏蔽视口:

Ext.Viewport.setMasked(true);