1 package org.kuali.student.lum.program.client.credential.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.documenttool.DocumentList;
6 import org.kuali.student.common.ui.client.widgets.documenttool.DocumentListBinding;
7 import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo;
8 import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
9 import org.kuali.student.lum.common.client.lu.LUUIConstants;
10 import org.kuali.student.lum.program.client.ProgramConstants;
11 import org.kuali.student.lum.program.client.ProgramSections;
12 import org.kuali.student.lum.program.client.credential.CredentialEditableHeader;
13 import org.kuali.student.lum.program.client.properties.ProgramProperties;
14
15
16
17
18 public class CredentialDocsViewConfiguration extends AbstractSectionConfiguration {
19
20 private CredentialDocsViewConfiguration(SectionView sectionView) {
21 rootSection = sectionView;
22 }
23
24 @Override
25 protected void buildLayout() {
26 configurer.addReadOnlyField(rootSection, "id", new MessageKeyInfo(""), new DocumentList(LUUIConstants.REF_DOC_RELATION_PROPOSAL_TYPE,false, false)).setWidgetBinding(new DocumentListBinding("id"));
27 }
28
29 public static CredentialDocsViewConfiguration createSpecial() {
30 String title = ProgramProperties.get().program_menu_sections_supportingDocuments();
31 return new CredentialDocsViewConfiguration(new VerticalSectionView(ProgramSections.SUPPORTING_DOCUMENTS_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new CredentialEditableHeader(title,ProgramSections.SUPPORTING_DOCUMENTS_EDIT)));
32 }
33
34 public static CredentialDocsViewConfiguration create(){
35 return new CredentialDocsViewConfiguration(new VerticalSectionView(ProgramSections.SUPPORTING_DOCUMENTS_VIEW, ProgramProperties.get().program_menu_sections_supportingDocuments(), ProgramConstants.PROGRAM_MODEL_ID));
36 }
37 }