Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
List Sencha Touch视口渲染问题onTap_List_Sencha Touch_Viewport_Formpanel - Fatal编程技术网

List Sencha Touch视口渲染问题onTap

List Sencha Touch视口渲染问题onTap,list,sencha-touch,viewport,formpanel,List,Sencha Touch,Viewport,Formpanel,我有一个功能齐全的Sencha Touc 2.1.1应用程序捆绑在Phonegap 2.5中。在其中,我有几个列表,用于生成用于数据输入和其他杂项活动的表单面板 一个示例如下(它发生在通过列表点击打开的所有“我的表单”面板上): 我有一个列表,其中包含一个在该容器中呈现的项目模板: Ext.define('EvaluateIt.view.Push', { extend: 'Ext.Container', fullscreen: true, //re

我有一个功能齐全的Sencha Touc 2.1.1应用程序捆绑在Phonegap 2.5中。在其中,我有几个列表,用于生成用于数据输入和其他杂项活动的表单面板

一个示例如下(它发生在通过列表点击打开的所有“我的表单”面板上):

我有一个列表,其中包含一个在该容器中呈现的项目模板:

Ext.define('EvaluateIt.view.Push', {
        extend: 'Ext.Container',
        fullscreen: true,
        //requires: ['Ext.TitleBar'],
        alias: 'widget.pushview',

        config: {
            layout: 'vbox',
            layout: 'fit',
            //id: 'pushview',
            items: [
                {
                    xtype: 'toolbar',
                    docked: 'top',
                    items: [
                        {
                            xtype: 'button',
                            itemId: 'loginButton',
                            text: 'Login',
                            iconCls: 'arrow_right',
                            iconMask: true 
                        },
                        {
                            xtype: 'button',
                            itemId: 'logOutButton',
                            text: 'Logout',
                            iconCls: 'arrow_right',
                            iconMask: true 
                        }

                    ]

                },
                {
                    flex: 1,
                    xtype: 'pushList'
                }

        ],
        listeners: [{
            delegate: '#logOutButton',
            event: 'tap',
            fn: 'onLogOutButtonTap'
        }]
    },
    onLogOutButtonTap: function () {
        this.fireEvent('onSignOffCommand');
    }

});
名单如下:

Ext.define('EvaluateIt.view.PushList', {
    extend: 'Ext.dataview.List', //'Ext.tab.Panel',
    alias : 'widget.pushList',
    config: {
        width: Ext.os.deviceType == 'Phone' ? null : 300,
        height: Ext.os.deviceType == 'Phone' ? null : 500,
        xtype: 'list',
        store: 'SiteEvaluations', //getRange(0, 9),
        itemTpl: [
            '<div><strong>Address: {address}</strong></div> '
        ],
        variableHeights: false
    }

}); 
在我的控制器中,通过以下方法将其称为视口:

onSelectPush: function(view, index, target, record, event) {

    console.log('Selected a SiteEvaluation from the list');
    var pushForm = Ext.Viewport.down('pushForm');

    if(!pushForm){
        pushForm = Ext.widget('pushForm');
    }    
    pushForm.setRecord(record);
    pushForm.showBy(target);

    console.log('Selected a Push from the list ' + index + ' ' + record.data.address);
}           
这通常按预期工作:

  • 打开推送视图
  • 点击列表中的地址
  • PushForm打开供用户执行任务
  • 然而!偶尔,当用户点击地址时,列表中的地址下方会出现一个黑色箭头,而不是打开推送表单(见附图)

    这种情况何时发生是不可预测的,但确实如此。到目前为止,它只发生在我的Android设备上,而不是在模拟器或网络浏览器上(我还没有从我的任何iOS用户那里听说过这件事)

    注意:让应用程序再次“正常”运行的唯一方法是完全重新启动或强制关闭应用程序


    知道是什么引起的吗?吃草

    您是否尝试过降低推送容器的高度和宽度?只是想看看会发生什么嗨,我想我很久以前就试过了,但行为没有改变。当我开始工作时,我发现一件有趣的事情是,如果我在容器中只使用布局:“fit”而不使用布局:“vbox”,那么列表中的所有记录都不会被渲染。然而,这与这个问题无关。我想知道这是否是某种设备资源问题。但由于无法在网络浏览器上复制,因此很难找出问题所在。没办法吗?任何人六羟甲基三聚氰胺六甲醚。。。也许这只是发生在我的设备上。
    onSelectPush: function(view, index, target, record, event) {
    
        console.log('Selected a SiteEvaluation from the list');
        var pushForm = Ext.Viewport.down('pushForm');
    
        if(!pushForm){
            pushForm = Ext.widget('pushForm');
        }    
        pushForm.setRecord(record);
        pushForm.showBy(target);
    
        console.log('Selected a Push from the list ' + index + ' ' + record.data.address);
    }