}
String contextPath = context.getContextPath();
Mode mode = context.getMode();
if (mode.allowLocalRendering() && def.isLocallyRenderable()) {
DefType defType = def.getDescriptor().getDefType();
BaseComponent<?, ?> cmp = null;
if (defType == DefType.APPLICATION) {
cmp = (BaseComponent<?, ?>) instanceService.getInstance((ApplicationDef) def, componentAttributes);