View Javadoc

1   package org.kuali.student.lum.program.client.credential.edit;
2   
3   import org.kuali.student.common.ui.client.configurable.mvc.sections.HorizontalSection;
4   import org.kuali.student.common.ui.client.configurable.mvc.sections.VerticalSection;
5   import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
6   import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo;
7   import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
8   import org.kuali.student.lum.program.client.ProgramConstants;
9   import org.kuali.student.lum.program.client.ProgramSections;
10  import org.kuali.student.lum.program.client.properties.ProgramProperties;
11  
12  /**
13   * @author Igor
14   */
15  public class CredentialManagingBodiesEditConfiguration extends AbstractSectionConfiguration {
16  
17      public CredentialManagingBodiesEditConfiguration() {
18          rootSection = new VerticalSectionView(ProgramSections.MANAGE_BODIES_EDIT, ProgramProperties.get().program_menu_sections_managingBodies(), ProgramConstants.PROGRAM_MODEL_ID);
19      }
20  
21      @Override
22      protected void buildLayout() {
23          HorizontalSection horizontalSection = new HorizontalSection();
24          horizontalSection.addSection(createLeftSection());
25          horizontalSection.addSection(createRightSection());
26          rootSection.addSection(horizontalSection);
27      }
28  
29      private VerticalSection createLeftSection() {
30          VerticalSection section = new VerticalSection();
31          configurer.addField(section, ProgramConstants.CURRICULUM_OVERSIGHT_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_curriculumOversightUnit()));
32          configurer.addField(section, ProgramConstants.STUDENT_OVERSIGHT_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_studentOversightUnit()));
33          return section;
34      }
35  
36      private VerticalSection createRightSection() {
37          VerticalSection section = new VerticalSection();
38          configurer.addField(section, ProgramConstants.CURRICULUM_OVERSIGHT_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_curriculumOversightDivision()));
39          configurer.addField(section, ProgramConstants.STUDENT_OVERSIGHT_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_studentOversightDivision()));
40          return section;
41      }
42  }