attributes.put("body", Lists.<BaseComponent<?, ?>> newArrayList(cmp));
attributes.put("bodyClass", "");
attributes.put("autoInitialize", "false");
Component template = instanceService.getInstance(templateDef.getDescriptor(), attributes);
renderingService.render(template, out);
} else {
attributes.put("auraScriptTags", sb.toString());
Map<String, Object> auraInit = Maps.newHashMap();
if (componentAttributes != null && !componentAttributes.isEmpty()) {
auraInit.put("attributes", componentAttributes);
}
auraInit.put("descriptor", def.getDescriptor());
auraInit.put("deftype", def.getDescriptor().getDefType());
auraInit.put("host", contextPath);
attributes.put("autoInitialize", "false");
attributes.put("autoInitializeSync", "true");
auraInit.put("instance", cmp);
auraInit.put("token", AuraBaseServlet.getToken());
StringBuilder contextWriter = new StringBuilder();
Aura.getSerializationService().write(context, null, AuraContext.class, contextWriter, "JSON");
auraInit.put("context", new Literal(contextWriter.toString()));
attributes.put("auraInitSync", Json.serialize(auraInit));
Component template = instanceService.getInstance(templateDef.getDescriptor(), attributes);
renderingService.render(template, out);
}
} catch (QuickFixException e) {
throw new AuraRuntimeException(e);
}