1 package org.kuali.student.lum.program.client.credential.view;
2
3 import org.kuali.student.common.ui.client.configurable.mvc.Configurer;
4 import org.kuali.student.common.ui.client.configurable.mvc.sections.Section;
5 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
6 import org.kuali.student.lum.common.client.configuration.AbstractControllerConfiguration;
7 import org.kuali.student.lum.common.client.configuration.Configuration;
8 import org.kuali.student.lum.common.client.configuration.ConfigurationManager;
9 import org.kuali.student.lum.program.client.ProgramConstants;
10 import org.kuali.student.lum.program.client.ProgramMsgConstants;
11 import org.kuali.student.lum.program.client.ProgramSections;
12
13
14
15
16 public class CredentialViewAllSectionsConfiguration extends AbstractControllerConfiguration {
17
18 public CredentialViewAllSectionsConfiguration(Configurer configurer) {
19 this.setConfigurer(configurer);
20 rootSection = new VerticalSectionView(ProgramSections.VIEW_ALL, getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_VIEWALL), ProgramConstants.PROGRAM_MODEL_ID, false);
21 }
22
23 @Override
24 protected void buildLayout() {
25 ConfigurationManager configurationManager = new ConfigurationManager();
26 configurationManager.registerConfiguration(CredentialInformationViewConfiguration.create(configurer));
27 configurationManager.registerConfiguration(CredentialManagingBodiesViewConfiguration.create(configurer));
28 configurationManager.registerConfiguration(CredentialCatalogDetailsViewConfiguration.create(configurer));
29 configurationManager.registerConfiguration(new CredentialRequirementsViewConfiguration(configurer, false));
30 configurationManager.registerConfiguration(CredentialLearningObjectivesViewConfiguration.create(configurer));
31 for (Configuration configuration : configurationManager.getConfigurations()) {
32 if (configuration instanceof AbstractControllerConfiguration) {
33 ((AbstractControllerConfiguration) configuration).setController(controller);
34 }
35 rootSection.addSection((Section) configuration.getView());
36 }
37 }
38 }