This bug still is in RC1. It is so bad, that IE will simply crawl up and die if you try and use it in a compund control. I have included code below to demonstrate the problem. Run the following code in FF and you will see that the call to setSelectorWidth does not work at all but at least the grid still displays. In IE, nothing gets rendered and IE spins out of control eating up memory as fast as it can. You need Task Manager to kill it. Any thoughts Alex on if this is going to get fixed for final release? Here is the code, try it with the setSelectorWidth line commented out and then try it with the line in place:
<html>
<head>
<script src="../../runtime/lib/aw.js"></script>
<link href="../../runtime/styles/xp/aw.css" rel="stylesheet" />
</head>
<body>
<script>
a = new AW.UI.Grid;
var myHeader = ["Number","Description"];
var myData = [
["1","Description 1"],
["2","Description 2"],
["3","Description 3"],
["4","Description 4"],
["5","Description 5"],
["6","Description 6"],
["7","Description 7"],
["8","Description 8"],
["9","Description 9"],
["10","Description 10"],
["11","Description 11"],
["12","Description 12"],
["13","Description 13"],
["14","Description 14"],
["15","Description 15"]
];
AW.UI.myDispatch = AW.System.Control.subclass();
AW.UI.myDispatch.create = function()
{
var obj = this.prototype;
with (obj)
{
setStyle("height", 500);
setStyle("position", "absolute");
}
obj.defineTemplate("Header", new AW.HTML.DIV);
with (obj.getTemplate("Header"))
{
setStyle("width", "100%");
setStyle("height", 30);
setStyle("background", "lightblue");
}
obj.defineTemplate("AuxUDV", new AW.HTML.DIV);
with (obj.getTemplate("AuxUDV"))
{
setStyle("height", 30);
setStyle("background", "lightyellow");
setStyle("width", "100%");
}
obj.defineTemplate("NavBar", new AW.HTML.DIV);
with (obj.getTemplate("NavBar"))
{
setStyle("width", "100%");
setStyle("height", 30);
setStyle("background", "lightgreen");
}
obj.defineTemplate("TheGrid", new AW.UI.Grid)
with (obj.getTemplate("TheGrid"))
{
setStyle("height", 200);
setStyle("width", "100%");
setCellText(myData);
setRowCount(myData.length);
setHeaderText("Header");
setColumnCount(2);
setSelectorVisible(true);
}
obj.setContent("html", function(){
return this.getHeaderTemplate() +
this.getAuxUDVTemplate() +
this.getNavBarTemplate() +
this.getTheGridTemplate();
})
}
a = new AW.UI.myDispatch;
a.setStyle("width", 600);
a.setId("WWW");
document.write(a);
</script>
</body>
</html>