Heya gang. Having a little trouble with the following snippet of code:
Code:
var logTbl = CE('table', 'tblLoggingCats');
logTbl.setAttribute('class', 'loggingTable');
logTbl.setAttribute('className', 'loggingTable');
Application.contDocBody.dom.appendChild(logTbl);
for(i=0;i<logCategoryObj.modules.length;i++) {
if (i % 3 == 0) {
var modRow = logTbl.insertRow(logTbl.rows.length);
}
var modCell = modRow.insertCell(modRow.cells.length);
modCell.setAttribute('class', 'loggingCell');
modCell.setAttribute('className', 'loggingCell');
var catName = new Ext.form.Checkbox({
boxLabel: _(logCategoryObj.modules[i].name)
});
var catList = [];
for(j=0;j<logCategoryObj.modules[i].categories.length;j++) {
catList[j] = new Ext.form.Checkbox({
boxLabel: _(logCategoryObj.modules[i].categories[j].name)
});
}
new Ext.form.FormPanel({
baseCls: 'x-plain',
defaults: {
border: false,
hideLabel: true
},
items: [
catName,
catList
]
}).render(Ext.get(modCell));
}
My logCategoryObj is an object containing (currently) 7 "modules", each of which have a "name" and a list of between 1 and 7 "categories" (each of which have both a "name" and an "enabled" boolean value).
When I run this, my category names all render beautifully, with their associated checkboxes ('check all' logic to be added later), but none of the "catList[]" names or checkboxes show up (just whitespace where maybe one of them would fit). When I drill down with the IE Dev toolbar, I see that only the 'x-panel-body' div is being created. Does anyone see a syntax error I'm overlooking?