ActiveItemChange和Dataview.Dataview显示 [英] ActiveItemChange and Dataview.Dataview display

查看:150
本文介绍了ActiveItemChange和Dataview.Dataview显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的SubView

Here is my SubView

我正在重新设计UI.起初,我的后退按钮是标题栏中的一个真实按钮. 此按钮的逻辑工作完美,并已MVCed.现在,我已链接我的选项卡,以将适当的信号发送到控制器.控制器确实正确地接收并导航了我的Tree结构.

I am reworking my UI. At first my back button was a real button in my titlebar. The logic of this button worked perfectly and was MVCed. Now I have linked my tab to send the proper signal to the controller. The controller does receive and navigate threw my Tree structure correctly.

问题在于,点击返回按钮后,项目"选项卡中的Dataview.dataview无法正确显示.

The problem is that the Dataview.dataview in the Project Tab is not displaying properly after a tap on the back button.

这是我的代码

onSubviewActiveItemChange: function(container, value, oldValue, eOpts) {
var me = container;
switch(value.getItemId())
{
    case  'back_Innertab':
        me.fireEvent('goback');
        break;
    case  'exit_Innertab':
        me.fireEvent('exit');
        break;
    case  'project_Innertab':
        me.fireEvent('reloadchildren')
        break;
    case  'chart_Innertab' :
        me.fireEvent('categorydisplay',me.getComponent('chart_Innertab').getComponent('pie'));
        break;
}

}

使用该代码,点击后退"选项卡时,控制器确实完成了预期的工作,而我的面板将我发送到了后退"选项卡中.如果要转到项目"选项卡,它将显示正确的元素.很好,但我不需要第二次点击即可返回到项目"选项卡.所以这是我的代码

With that code, when Back tab is tapped, the controller does the job has intented, and my tabpanel send me into the Back tab. If I were to go to Project tab, it would display the right elements. Nice but I don't want to need a 2nd tap to go back to Project Tab. So here would be my code

  onSubviewActiveItemChange: function(container, value, oldValue, eOpts) {
    var me = container;
    switch(value.getItemId())
    {
        case  'back_Innertab':
            me.fireEvent('goback');
            me.setActiveItem(oldValue);
            break;
        case  'exit_Innertab':
            me.fireEvent('exit');
            break;
        case  'project_Innertab':
            me.fireEvent('reloadchildren')
            break;
        case  'chart_Innertab' :
            me.fireEvent('categorydisplay',me.getComponent('chart_Innertab').getComponent('pie'));
            break;
    }
}

通常,它会在水龙头点击之前将我发送回活动标签,但事实并非如此. 它使我回到返回"选项卡,但项目"选项卡已覆盖...

Normally it would send me back to the active tab before the tap, but it does not. It send me back to Back Tab but with the Project Tab overlayed...

这里是检查器...(在Back Tab轻触后检查屏幕快照中的灰色区域)

Here is the inspector... (inspecting the grey area in screenshot, after a Back Tab Tap)

我该如何纠正它,使其真正出现在项目"选项卡中并正确显示? 我真的很需要它,但似乎找不到解决方法:S

How can I correct that to really be in the Project Tab and have it displayed properly? I really need it and can't seem to find a way of doing so :S

推荐答案

OnActiveItemChange

OnActiveItemChange

如果要在此事件内更改选项卡,这是由选项卡更改引起的,则结果几乎是不确定的,因为后端实现无法正确支持此类任务.

If you are to change tab inside of this event cause by a tab change, the result is nearly undefined the back-end implementation of it is not able to support such task correctly.

这篇关于ActiveItemChange和Dataview.Dataview显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆