Iterable<Component> components = dashboard.getRegulars();
for(Component comp : components)
{
if(StringUtils.isNotEmpty(comp.getName()) && comp instanceof WidgetComponent)
{
WidgetComponent widgetComp = (WidgetComponent)comp;
CdfRunJsDashboardWriteOptions childOptions = options
.addAliasPrefix(comp.getName()); // <-- NOTE:!
CdfRunJsDashboardWriteResult dashResult = null;
try
{
dashResult = dashMgr.getDashboardCdfRunJs(
widgetComp.getWcdfPath(),
childOptions,
this._context.isBypassCacheRead());
}
catch (ThingWriteException ex)
{
logger.error("Could not render widget '" + widgetComp.getWcdfPath() + "'", ex);
}
String containerId = widgetComp.tryGetPropertyValue("htmlObject", "")
.replaceAll("\\$\\{.*:(.*)\\}", "$1");
widgetsByContainerId.put(containerId, dashResult);
}
}