Fixed another lazy init excpetion
parent
5bda9ca1d3
commit
f024b2c47f
|
|
@ -189,18 +189,21 @@ public class SelectType extends CMSForm implements PrintListener,
|
||||||
final String[] types = (String[]) data.get(TYPES);
|
final String[] types = (String[]) data.get(TYPES);
|
||||||
|
|
||||||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||||
final ContentTypeManager typeManager = cdiUtil.findBean(
|
// final ContentTypeManager typeManager = cdiUtil.findBean(
|
||||||
ContentTypeManager.class);
|
// ContentTypeManager.class);
|
||||||
final ContentSectionManager sectionManager = cdiUtil.findBean(
|
// final ContentSectionManager sectionManager = cdiUtil.findBean(
|
||||||
ContentSectionManager.class);
|
// ContentSectionManager.class);
|
||||||
|
final ContentTypeAdminPaneController controller = cdiUtil
|
||||||
|
.findBean(ContentTypeAdminPaneController.class);
|
||||||
|
|
||||||
if (types != null) {
|
if (types != null) {
|
||||||
for (String type : types) {
|
for (String type : types) {
|
||||||
sectionManager.addContentTypeToSection(
|
// sectionManager.addContentTypeToSection(
|
||||||
typeManager.classNameToClass(type),
|
// typeManager.classNameToClass(type),
|
||||||
section,
|
// section,
|
||||||
section.getLifecycleDefinitions().get(0),
|
// section.getLifecycleDefinitions().get(0),
|
||||||
section.getWorkflowTemplates().get(0));
|
// section.getWorkflowTemplates().get(0));
|
||||||
|
controller.addContentTypeToContentSection(type, section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue