IE Runtime Error on AW.HTML.TR.refresh()
I'm encountering a problem when using my subclass of AW.HTML.TABLE. I've overriden the refresh method so that it can do something with some xml (not shown for simplicity), but when I call the row to refresh, IE6 throws an exception ("Runtime Error"). Have a look at the code below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<script src="./runtime/lib/aw.js"></script>
<link href="./runtime/styles/xp/aw.css" rel="stylesheet"></link>
<style>
.aw-div-outerdiv {border: 1px solid green; height: 50px; }
.aw-table-table {border: 1px solid red; height: 100%; }
.aw-row-row {border: 1px solid yellow; }
.aw-cell-cell {border: 1px solid blue; }
</style>
</head>
<body>
<script>
var CustomTable = AW.HTML.TABLE.subclass();
CustomTable.create = function(){
var obj = this.prototype;
var _super = this.superclass.prototype;
obj.init = function() {
_super.init.call(this);
systemHTMLRow = new AW.HTML.TR;
systemHTMLRow.setClass("row", "row");
this.setContent("row", systemHTMLRow);
this.setClass("table", "table");
this.addCell("cellA", "Refreshing the row after adding this cell causes no problems in IE6 or Firefox");
this.getContent("row").refresh();
}
obj.addCell = function(key, message) {
cell = new AW.HTML.TD;
cell.setClass("cell", "cell");
var testLabel = new AW.UI.Label;
testLabel.setControlText(message);
cell.setContent("label", testLabel);
this.getContent("row").setContent(key, cell);
}
obj.refresh = function() {
this.addCell("cellB", "Refreshing the row after adding this cell causes problems in IE6 only");
this.getContent("row").refresh();
}
}
function refreshTable() {
alert("calling CustomTable.refresh()...");
table.refresh();
};
var outerDiv = new AW.HTML.DIV;
outerDiv.setClass("div", "outerdiv");
var table = new CustomTable();
outerDiv.setContent("content", table);
document.write(outerDiv);
refreshTable();
</script>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<script src="./runtime/lib/aw.js"></script>
<link href="./runtime/styles/xp/aw.css" rel="stylesheet"></link>
<style>
.aw-div-outerdiv {border: 1px solid green; height: 50px; }
.aw-table-table {border: 1px solid red; height: 100%; }
.aw-row-row {border: 1px solid yellow; }
.aw-cell-cell {border: 1px solid blue; }
</style>
</head>
<body>
<script>
var CustomTable = AW.HTML.TABLE.subclass();
CustomTable.create = function(){
var obj = this.prototype;
var _super = this.superclass.prototype;
obj.init = function() {
_super.init.call(this);
systemHTMLRow = new AW.HTML.TR;
systemHTMLRow.setClass("row", "row");
this.setContent("row", systemHTMLRow);
this.setClass("table", "table");
this.addCell("cellA", "Refreshing the row after adding this cell causes no problems in IE6 or Firefox");
this.getContent("row").refresh();
}
obj.addCell = function(key, message) {
cell = new AW.HTML.TD;
cell.setClass("cell", "cell");
var testLabel = new AW.UI.Label;
testLabel.setControlText(message);
cell.setContent("label", testLabel);
this.getContent("row").setContent(key, cell);
}
obj.refresh = function() {
this.addCell("cellB", "Refreshing the row after adding this cell causes problems in IE6 only");
this.getContent("row").refresh();
}
}
function refreshTable() {
alert("calling CustomTable.refresh()...");
table.refresh();
};
var outerDiv = new AW.HTML.DIV;
outerDiv.setClass("div", "outerdiv");
var table = new CustomTable();
outerDiv.setContent("content", table);
document.write(outerDiv);
refreshTable();
</script>
</body>
</html>
June 13,