Refresh causes header area (toolbar) to be refreshed as well
Hi All,
I have a grid with a header area (topline). The header area holds an IFRAME which source is an HTML file that draws the toolbar.
The problem is that when the grid is refreshed from the XML file via oTable.refresh() the IFRAME content is also reloaded.
This causes the toolbar to flicker and also the toolbar looses its state. Can the refresh of the IFRAME be prevented when doing a oTable.refresh()
Here is the code:
var obj = new AW.UI.Grid;
var oTable= new AW.XML.Table;
obj.setHeaderText("symbol");
obj.setColumnCount(1);
obj.setCellModel(oTable);
oTable.setColumns(["ticker"]);
oTable.setURL("basic1.xml");
var b1 = new AW.HTML.DIV;
b1.setContent ("<IFRAME frameborder='0' height = '28px' width='100%' src='FormToolbar.cfm' scrolling='no' name='grdToolbar' ></iframe>");
obj.defineTemplate("toolbar", b1);
obj.setLayoutTemplate(new AW.Panels.Horizontal);
obj.setPanelTemplate(function(i){
switch(i){
case 0: return this.getToolbarTemplate();
case 1: return this.getScrollTemplate();
}
});
obj.setPanelHeight(30, 0);
document.write(obj);
oTable.request();
// create button which refreshes grid
var oBtnRefresh = new AW.UI.Button;
oBtnRefresh.setControlText('Click here to refresh');
oBtnRefresh.onClick = function(){
oTable.request();
}
document.write(oBtnRefresh);
I have a grid with a header area (topline). The header area holds an IFRAME which source is an HTML file that draws the toolbar.
The problem is that when the grid is refreshed from the XML file via oTable.refresh() the IFRAME content is also reloaded.
This causes the toolbar to flicker and also the toolbar looses its state. Can the refresh of the IFRAME be prevented when doing a oTable.refresh()
Here is the code:
var obj = new AW.UI.Grid;
var oTable= new AW.XML.Table;
obj.setHeaderText("symbol");
obj.setColumnCount(1);
obj.setCellModel(oTable);
oTable.setColumns(["ticker"]);
oTable.setURL("basic1.xml");
var b1 = new AW.HTML.DIV;
b1.setContent ("<IFRAME frameborder='0' height = '28px' width='100%' src='FormToolbar.cfm' scrolling='no' name='grdToolbar' ></iframe>");
obj.defineTemplate("toolbar", b1);
obj.setLayoutTemplate(new AW.Panels.Horizontal);
obj.setPanelTemplate(function(i){
switch(i){
case 0: return this.getToolbarTemplate();
case 1: return this.getScrollTemplate();
}
});
obj.setPanelHeight(30, 0);
document.write(obj);
oTable.request();
// create button which refreshes grid
var oBtnRefresh = new AW.UI.Button;
oBtnRefresh.setControlText('Click here to refresh');
oBtnRefresh.onClick = function(){
oTable.request();
}
document.write(oBtnRefresh);
Maurice
October 19,