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 | 0 | public CredentialSummaryConfiguration(Configurer configurer) { |
22 | 0 | this.setConfigurer(configurer); |
23 | 0 | rootSection = new VerticalSectionView(ProgramSections.SUMMARY, getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_SUMMARY), ProgramConstants.PROGRAM_MODEL_ID, true); |
24 | 0 | } |
25 | |
|
26 | |
@Override |
27 | |
protected void buildLayout() { |
28 | 0 | ConfigurationManager configurationManager = new ConfigurationManager(); |
29 | 0 | CredentialInformationViewConfiguration credentialInfoViewConfig = CredentialInformationViewConfiguration.createSpecial(configurer); |
30 | 0 | configurationManager.registerConfiguration(credentialInfoViewConfig); |
31 | 0 | configurationManager.registerConfiguration(CredentialManagingBodiesViewConfiguration.createSpecial(configurer)); |
32 | 0 | configurationManager.registerConfiguration(CredentialCatalogDetailsViewConfiguration.createSpecial(configurer)); |
33 | 0 | configurationManager.registerConfiguration(new CredentialRequirementsViewConfiguration(configurer, true)); |
34 | 0 | configurationManager.registerConfiguration(CredentialLearningObjectivesViewConfiguration.createSpecial(configurer)); |
35 | 0 | configurationManager.registerConfiguration(CredentialDocsViewConfiguration.createSpecial(configurer)); |
36 | |
|
37 | 0 | rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus())); |
38 | 0 | for (Configuration configuration : configurationManager.getConfigurations()) { |
39 | 0 | if (configuration instanceof AbstractControllerConfiguration) { |
40 | 0 | ((AbstractControllerConfiguration) configuration).setController(controller); |
41 | |
} |
42 | 0 | rootSection.addSection((Section) configuration.getView()); |
43 | |
} |
44 | 0 | rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus())); |
45 | 0 | } |
46 | |
} |