1 | |
package org.kuali.student.lum.program.client.core.view; |
2 | |
|
3 | |
import org.kuali.student.common.ui.client.configurable.mvc.Configurer; |
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.core.document.ui.client.widgets.documenttool.DocumentList; |
7 | |
import org.kuali.student.core.document.ui.client.widgets.documenttool.DocumentListBinding; |
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.ProgramMsgConstants; |
12 | |
import org.kuali.student.lum.program.client.ProgramSections; |
13 | |
import org.kuali.student.lum.program.client.credential.CredentialEditableHeader; |
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
public class CoreDocsViewConfiguration extends AbstractSectionConfiguration { |
19 | |
|
20 | 0 | private CoreDocsViewConfiguration(Configurer configurer, boolean isSpecial) { |
21 | 0 | this.setConfigurer(configurer); |
22 | 0 | String title = getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_SUPPORTINGDOCUMENTS); |
23 | 0 | if (!isSpecial){ |
24 | 0 | this.rootSection = new VerticalSectionView(ProgramSections.SUPPORTING_DOCUMENTS_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID); |
25 | |
} else { |
26 | 0 | this.rootSection = new VerticalSectionView(ProgramSections.SUPPORTING_DOCUMENTS_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new CredentialEditableHeader(title, |
27 | |
ProgramSections.SUPPORTING_DOCUMENTS_EDIT)); |
28 | |
} |
29 | 0 | } |
30 | |
|
31 | |
@Override |
32 | |
protected void buildLayout() { |
33 | 0 | configurer.addReadOnlyField(rootSection, "id", new MessageKeyInfo(""), new DocumentList(LUUIConstants.REF_DOC_RELATION_PROPOSAL_TYPE,false, false)).setWidgetBinding(new DocumentListBinding("id")); |
34 | 0 | } |
35 | |
|
36 | |
public static CoreDocsViewConfiguration createSpecial(Configurer configurer) { |
37 | 0 | return new CoreDocsViewConfiguration(configurer, true); |
38 | |
} |
39 | |
|
40 | |
public static CoreDocsViewConfiguration create(Configurer configurer){ |
41 | 0 | return new CoreDocsViewConfiguration(configurer, false); |
42 | |
} |
43 | |
} |
44 | |
|