数据加载后如何刷新面板? [英] How to refresh a panel after data is loaded?
问题描述
panel = new Ext.Panel({
布局:'fit',
renderTo:'my_div',
monitorResize:true,//浏览器继电器调整大小
height:500,
autoWidth:true,
项目:[
centerPanel
],
plain:true
});
页面加载完成后,面板为空,但是当我调整浏览器的大小时,内容会显示为魔术!
我认为当面板首次呈现时,数据尚未完成加载。
我得到的内容显示没有调整浏览器的大小?
我怀疑,您需要明确地使面板被渲染。创建面板后,进行以下调用:
panel.doLayout();
Sencha文档说:在已经呈现的容器中添加新组件后,需要调用此函数,或者可能在更改子组件的大小/位置属性之后。
I have a extjs panel rendered inside a div like this:
panel = new Ext.Panel({
layout : 'fit',
renderTo: 'my_div',
monitorResize: true, // relay on browser resize
height: 500,
autoWidth: true,
items : [
centerPanel
],
plain : true
});
After the page has loaded the panel is empty, but when I resize the browser the contents appears by magic!
I think the data has not finished loading when the panel is rendered the first time.
How can I get the contents to show without resizing the browser?
I suspect the issue is that you need to explicitly cause the panel to be rendered. After creating the panel, make the following call:
panel.doLayout();
Sencha documentation says "A call to this function is required after adding a new component to an already rendered container, or possibly after changing sizing/position properties of child components."
这篇关于数据加载后如何刷新面板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!