final JXPathContext context = doc.getRelativeContext(pointer);
final String rowId = (String)context.getValue("id");
final String rowName = XPathUtils.getStringValue(context, "properties[name='name']/value");
@SuppressWarnings("unchecked")
final Render renderer = (Render)getRender(context);
renderer.processProperties();
renderer.aliasId(alias);
layout.append(NEWLINE + getIndent(indent));
layout.append(renderer.renderStart());
if(widgetsByContainerId.containsKey(rowName))
{
CdfRunJsDashboardWriteResult widgetResult = widgetsByContainerId.get(rowName);
layout.append(widgetResult.getLayout());
}
else
{
renderRows(
context,
context.iteratePointers("/layout/rows[parent='" + rowId + "']"),
widgetsByContainerId,
alias,
layout,
indent + 2);
}
layout.append(NEWLINE + getIndent(indent));
layout.append(renderer.renderClose());
}
}