1 | |
package org.kuali.student.lum.program.client.core.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 CoreViewAllConfiguration extends AbstractControllerConfiguration { |
17 | |
|
18 | 0 | public CoreViewAllConfiguration(Configurer configurer) { |
19 | 0 | this.setConfigurer(configurer); |
20 | 0 | rootSection = new VerticalSectionView(ProgramSections.VIEW_ALL, getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_VIEWALL), ProgramConstants.PROGRAM_MODEL_ID, false); |
21 | 0 | } |
22 | |
|
23 | |
@Override |
24 | |
protected void buildLayout() { |
25 | 0 | ConfigurationManager configurationManager = new ConfigurationManager(); |
26 | 0 | configurationManager.registerConfiguration(CoreInformationViewConfiguration.create(configurer)); |
27 | 0 | configurationManager.registerConfiguration(CoreManagingBodiesViewConfiguration.create(configurer)); |
28 | 0 | configurationManager.registerConfiguration(CoreCatalogInformationViewConfiguration.create(configurer)); |
29 | 0 | configurationManager.registerConfiguration(new CoreRequirementsViewConfiguration(configurer, false)); |
30 | 0 | configurationManager.registerConfiguration(CoreLearningObjectivesViewConfiguration.create(configurer)); |
31 | 0 | for (Configuration configuration : configurationManager.getConfigurations()) { |
32 | 0 | if (configuration instanceof AbstractControllerConfiguration) { |
33 | 0 | ((AbstractControllerConfiguration) configuration).setController(controller); |
34 | |
} |
35 | 0 | rootSection.addSection((Section) configuration.getView()); |
36 | |
} |
37 | 0 | } |
38 | |
} |