Fixed another lazy init excpetion

ccm-docs
Jens Pelzetter 2020-02-23 11:33:27 +01:00
parent e105fb74fb
commit f47dd80a39
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 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);
} }
} }
} }