* @since 0.0.234
*/
public class ProvidedBodyRenderer implements Renderer {
@Override
public void render(BaseComponent<?, ?> component, Appendable out) throws IOException, QuickFixException {
ComponentDefRefArray bodyAttribute = component.getAttributes().getValue("body", ComponentDefRefArray.class);
if (bodyAttribute == null) {
return;
}
// Loop over all the items in the body, which is a ComponentDefRefArray
// If you find a ComponentInstance, render that instance
for (Object bodyComponent : bodyAttribute.getList()) {
if(bodyComponent instanceof BaseComponent) {
Aura.getRenderingService().render((BaseComponent<?, ?>)bodyComponent, out);
}
}
return;