View Javadoc

1   package org.kuali.student.lum.program.client.major.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   * @author Igor
15   */
16  public class ViewAllSectionConfiguration extends AbstractControllerConfiguration {
17  
18      public ViewAllSectionConfiguration(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(MajorKeyProgramInfoViewConfiguration.create(configurer));
27          configurationManager.registerConfiguration(ManagingBodiesViewConfiguration.create(configurer));
28          configurationManager.registerConfiguration(SpecializationsViewConfiguration.create(configurer));
29          configurationManager.registerConfiguration(CatalogInformationViewConfiguration.create(configurer));
30          configurationManager.registerConfiguration(new ProgramRequirementsViewConfiguration(configurer, false));
31          configurationManager.registerConfiguration(LearningObjectivesViewConfiguration.create(configurer));
32          for (Configuration configuration : configurationManager.getConfigurations()) {
33              if (configuration instanceof AbstractControllerConfiguration) {
34                  ((AbstractControllerConfiguration) configuration).setController(controller);
35              }
36              rootSection.addSection((Section) configuration.getView());
37          }
38      }
39  }