The header that is attached to a grid is getting destroyed on reload. The following code snipet is supposed to clear the old list of choices and add a new one, but it is also removing the previously attached header.
var gridSrcURL = _getGridSrcURL();
IOBJ$.chooserGrid.clearAll(false); // false to keep header
IOBJ$.chooserGrid.loadXML(gridSrcURL);
Here is the load method which attached the header, but never gets called again even though the new XML shows up fine (and clears the header) :
IOBJ$.chooserGrid.loadXML(gridSrcURL, function() {
var grid = IOBJ$.chooserGrid;
if (!IOBJ$.isTree && IOBJ$.useGridSort) {
grid.sortRows(0,"str","asc");
};
grid.detachHeader(0); // hides loading status message
if(!IOBJ$.isTree) {
grid.attachHeader("#text_filter");
}
else {
grid.attachHeader("#text_search");
}
autoSelectChooserListItem(itemKey);
if (grid.hdrLabels.length > 0 && grid.getRowsNum() == 0) {
grid.addRow("no_rows_msg","Nothing found to display.");
}
else {
grid.deleteRow("no_rows_msg");
grid.setSizes();
}
}