Fixed another lazy init excpetion

Former-commit-id: f024b2c47f
pull/2/head
Jens Pelzetter 2020-02-23 11:33:27 +01:00
parent 050c8ae42a
commit 960a0705cb
1 changed files with 12 additions and 9 deletions

View File

@ -189,18 +189,21 @@ public class SelectType extends CMSForm implements PrintListener,
final String[] types = (String[]) data.get(TYPES);
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
final ContentTypeManager typeManager = cdiUtil.findBean(
ContentTypeManager.class);
final ContentSectionManager sectionManager = cdiUtil.findBean(
ContentSectionManager.class);
// final ContentTypeManager typeManager = cdiUtil.findBean(
// ContentTypeManager.class);
// final ContentSectionManager sectionManager = cdiUtil.findBean(
// ContentSectionManager.class);
final ContentTypeAdminPaneController controller = cdiUtil
.findBean(ContentTypeAdminPaneController.class);
if (types != null) {
for (String type : types) {
sectionManager.addContentTypeToSection(
typeManager.classNameToClass(type),
section,
section.getLifecycleDefinitions().get(0),
section.getWorkflowTemplates().get(0));
// sectionManager.addContentTypeToSection(
// typeManager.classNameToClass(type),
// section,
// section.getLifecycleDefinitions().get(0),
// section.getWorkflowTemplates().get(0));
controller.addContentTypeToContentSection(type, section);
}
}
}