I noticed that when using the technique of layering layouts (using DISPLAY LAYOUT), you can't use the AwareApp.getPanelId function (as described here and here.
The aware JS code has a comment to this function: "Not to be used when a panel belongs to a perspective displayed using DISPLAY LAYOUT - see the next function for this". The next function is AwareApp.getLayoutPanelId(), which was introduced in version 8.0 build 2358 (reference: https://www.awareim.com/dokuwiki/doku.php/changelog/0000/8.n/8.0/2358) but is not documented in the AIM documentation and which does not seem to be used anywhere by Aware. When trying to use this function in my render script, I got a reference error. This is because the function has a line
var t = getPanelId(frameType, tabName, panelName);
This should have been:
var t = this.getPanelId(frameType, tabName, panelName);
I have now worked around this by using AwareApp.getPanelId() and then calling the following function with the resulting id:
function getLayoutPanelId(panelId) {
let elem = $("#aware_app").find("[id='" + panelId + "']");
if (elem.length == 1) {
return panelId;
}
elem = $("#aware_app").find("[id*='" + panelId + "']");
if (elem.length > 0) {
return elem.attr("id");
}
return null;
}