lastid
11 Mar 2007, 5:12 AM
Hi,
I think this is strange.I setUrl 4 times to a Panel, and then when it's activated, the 4 urls are loaded.
Shouldnt it load just the last url?
Here is the code
<html>
<head>
<title>Bug?</title>
<link rel="stylesheet" type="text/css" href="ext-all.css" />
<script src="yui-utilities.js" ></script>
<script src="ext-yui-adapter.js" ></script>
<script src="ext-all.js" ></script>
<script>
var DlgExample = {
init : function(){
dlgViewAlbum = new Ext.LayoutDialog("dlgViewAlbum", {
width:600,
height:400,
shadow:true,
minWidth:300,
minHeight:300,
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: true
}
});
dlgViewAlbum.addKeyListener(27, dlgViewAlbum.hide, dlgViewAlbum);
dlgViewAlbum.addButton('Close', dlgViewAlbum.hide, dlgViewAlbum);
var layout = dlgViewAlbum.getLayout();
layout.beginUpdate();
layout.add('center', new Ext.ContentPanel('viewTab',{title:'View'}));
layout.add('center', new Ext.ContentPanel('uploadTab',{title:'Upload'}));
layout.endUpdate();
layout.showPanel('viewTab');
viewPanel = layout.findPanel('viewTab');
viewPanel.setUrl('news1.txt');
viewPanel.setUrl('news2.txt');
viewPanel.setUrl('news1.txt');
viewPanel.setUrl('news2.txt');
dlgViewAlbum.show();
}
}
Ext.EventManager.onDocumentReady(DlgExample.init, DlgExample, true);
</script>
</head>
<body>
<div id='dlgViewAlbum'>
<div id='viewTab'></div>
<div id='uploadTab'></div>
</div>
</body>
</html>
And here is the live example:
http://lastid.free.fr/test.html
Each time I click on the view tab to activate it, firebug shows that there are 4 requests to the 4 urls
I think this is strange.I setUrl 4 times to a Panel, and then when it's activated, the 4 urls are loaded.
Shouldnt it load just the last url?
Here is the code
<html>
<head>
<title>Bug?</title>
<link rel="stylesheet" type="text/css" href="ext-all.css" />
<script src="yui-utilities.js" ></script>
<script src="ext-yui-adapter.js" ></script>
<script src="ext-all.js" ></script>
<script>
var DlgExample = {
init : function(){
dlgViewAlbum = new Ext.LayoutDialog("dlgViewAlbum", {
width:600,
height:400,
shadow:true,
minWidth:300,
minHeight:300,
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: true
}
});
dlgViewAlbum.addKeyListener(27, dlgViewAlbum.hide, dlgViewAlbum);
dlgViewAlbum.addButton('Close', dlgViewAlbum.hide, dlgViewAlbum);
var layout = dlgViewAlbum.getLayout();
layout.beginUpdate();
layout.add('center', new Ext.ContentPanel('viewTab',{title:'View'}));
layout.add('center', new Ext.ContentPanel('uploadTab',{title:'Upload'}));
layout.endUpdate();
layout.showPanel('viewTab');
viewPanel = layout.findPanel('viewTab');
viewPanel.setUrl('news1.txt');
viewPanel.setUrl('news2.txt');
viewPanel.setUrl('news1.txt');
viewPanel.setUrl('news2.txt');
dlgViewAlbum.show();
}
}
Ext.EventManager.onDocumentReady(DlgExample.init, DlgExample, true);
</script>
</head>
<body>
<div id='dlgViewAlbum'>
<div id='viewTab'></div>
<div id='uploadTab'></div>
</div>
</body>
</html>
And here is the live example:
http://lastid.free.fr/test.html
Each time I click on the view tab to activate it, firebug shows that there are 4 requests to the 4 urls