1 | |
package org.kuali.student.lum.program.client.core.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 CoreDocsViewConfiguration extends AbstractSectionConfiguration { |
19 | |
|
20 | 0 | private CoreDocsViewConfiguration(SectionView sectionView) { |
21 | 0 | rootSection = sectionView; |
22 | 0 | } |
23 | |
|
24 | |
@Override |
25 | |
protected void buildLayout() { |
26 | 0 | configurer.addReadOnlyField(rootSection, "id", new MessageKeyInfo(""), new DocumentList(LUUIConstants.REF_DOC_RELATION_PROPOSAL_TYPE,false, false)).setWidgetBinding(new DocumentListBinding("id")); |
27 | 0 | } |
28 | |
|
29 | |
public static CoreDocsViewConfiguration createSpecial() { |
30 | 0 | String title = ProgramProperties.get().program_menu_sections_supportingDocuments(); |
31 | 0 | return new CoreDocsViewConfiguration(new VerticalSectionView(ProgramSections.SUPPORTING_DOCUMENTS_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new CredentialEditableHeader(title,ProgramSections.SUPPORTING_DOCUMENTS_EDIT))); |
32 | |
} |
33 | |
|
34 | |
public static CoreDocsViewConfiguration create(){ |
35 | 0 | return new CoreDocsViewConfiguration(new VerticalSectionView(ProgramSections.SUPPORTING_DOCUMENTS_VIEW, ProgramProperties.get().program_menu_sections_supportingDocuments(), ProgramConstants.PROGRAM_MODEL_ID)); |
36 | |
} |
37 | |
} |
38 | |
|