1 package org.kuali.student.lum.program.client.credential.edit;
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 import org.kuali.student.lum.program.client.credential.CredentialManager;
13 import org.kuali.student.lum.program.client.credential.view.*;
14 import org.kuali.student.lum.program.client.widgets.SummaryActionPanel;
15
16
17
18
19 public class CredentialSummaryConfiguration extends AbstractControllerConfiguration {
20
21 public CredentialSummaryConfiguration(Configurer configurer) {
22 this.setConfigurer(configurer);
23 rootSection = new VerticalSectionView(ProgramSections.SUMMARY, getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_SUMMARY), ProgramConstants.PROGRAM_MODEL_ID, true);
24 }
25
26 @Override
27 protected void buildLayout() {
28 ConfigurationManager configurationManager = new ConfigurationManager();
29 CredentialInformationViewConfiguration credentialInfoViewConfig = CredentialInformationViewConfiguration.createSpecial(configurer);
30 configurationManager.registerConfiguration(credentialInfoViewConfig);
31 configurationManager.registerConfiguration(CredentialManagingBodiesViewConfiguration.createSpecial(configurer));
32 configurationManager.registerConfiguration(CredentialCatalogDetailsViewConfiguration.createSpecial(configurer));
33 configurationManager.registerConfiguration(new CredentialRequirementsViewConfiguration(configurer, true));
34 configurationManager.registerConfiguration(CredentialLearningObjectivesViewConfiguration.createSpecial(configurer));
35 configurationManager.registerConfiguration(CredentialDocsViewConfiguration.createSpecial(configurer));
36
37 rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus()));
38 for (Configuration configuration : configurationManager.getConfigurations()) {
39 if (configuration instanceof AbstractControllerConfiguration) {
40 ((AbstractControllerConfiguration) configuration).setController(controller);
41 }
42 rootSection.addSection((Section) configuration.getView());
43 }
44 rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus()));
45 }
46 }