1 package org.kuali.student.lum.program.client.major.view;
2
3 import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView;
4 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
5 import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo;
6 import org.kuali.student.common.ui.client.widgets.menus.KSListPanel;
7 import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
8 import org.kuali.student.lum.common.client.lo.TreeStringBinding;
9 import org.kuali.student.lum.program.client.ProgramConstants;
10 import org.kuali.student.lum.program.client.ProgramSections;
11 import org.kuali.student.lum.program.client.major.MajorEditableHeader;
12 import org.kuali.student.lum.program.client.properties.ProgramProperties;
13 import org.kuali.student.lum.program.client.widgets.EditableHeader;
14
15
16
17
18 public class LearningObjectivesViewConfiguration extends AbstractSectionConfiguration {
19
20
21 public static LearningObjectivesViewConfiguration create() {
22 return new LearningObjectivesViewConfiguration(new VerticalSectionView(ProgramSections.LEARNING_OBJECTIVES_VIEW, ProgramProperties.get().program_menu_sections_learningObjectives(), ProgramConstants.PROGRAM_MODEL_ID));
23 }
24
25 public static LearningObjectivesViewConfiguration createSpecial() {
26 String title = ProgramProperties.get().program_menu_sections_learningObjectives();
27 return new LearningObjectivesViewConfiguration(new VerticalSectionView(ProgramSections.LEARNING_OBJECTIVES_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new MajorEditableHeader(title, ProgramSections.LEARNING_OBJECTIVES_EDIT)));
28 }
29
30 private LearningObjectivesViewConfiguration(SectionView sectionView) {
31 rootSection = sectionView;
32 }
33
34 protected void buildLayout() {
35 configurer.addReadOnlyField(rootSection, ProgramConstants.LEARNING_OBJECTIVES, new MessageKeyInfo(""), new KSListPanel()).setWidgetBinding(new TreeStringBinding());
36 }
37 }