【发布时间】:2015-12-17 07:56:43
【问题描述】:
我有一个使用 ExtJs5 呈现的页面。它有一个标签面板,其中包含一个xtype:Container,
this.tabPanel = Ext.create('Ext.tab.Panel', {
cls: 'tabPanel',
width: '100%',
minHeight: 400,
activeTab: 0,
items: [
{
title: 'Details',
items: [
this.detailsPanel
]
},
{
title: 'History',
items: [
{
xtype: 'container',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [
this.collectionHistoryTitle,
collectionHistoryChart,
this.horizontalLineTop,
this.collectionHistoryPanelView,
this.horizontalLineBottomMargin,
this.collectionHistoryGrid,
//this.collectionLogPaging,
]
},
this.collectionHistoryDoNotChangeMessage
]
这里,this.collectionHistoryPanelView,如下,
this.collectionHistoryPanelView = Ext.create('Ext.view.View', {
store: 'collectionHistoryPanelStore',
tpl: this.collectionHistoryPanelTpl,
emptyText: 'Please select a row.',
loadMask: false,
margin: '0 0 10 0'
});
发生的情况是,当我单击网格行(this.collectionHistoryGrid)时,emptyText('请选择一行')被 html 模板(this.collectionHistoryPanelTpl)替换,隐藏在网格后面并正确显示刷新后。我已经尝试了很多东西,但到目前为止没有任何效果。
点击网格后,Ext 视图被隐藏:
刷新后工作:
【问题讨论】:
-
您的示例缺少某些required properties。
-
您能详细说明一下吗?我是堆栈溢出的新手。
-
您的代码无法重现该问题,因为无法查看您在网格中引用的商店与数据视图之间的连接,以及在特定情况下如何填充数据视图记录在网格中被选中。
-
你在
collectionHistoryPanelView上试过doLayout吗? -
我在collectionHistoryPanelView中添加了一个监听器,它调用了面板的doLayout,但还是不行——监听器:{ beforerender:function(){ Ext.getCmp('panel').doLayout(); } }
标签: javascript extjs extjs4 extjs4.2 extjs5