1 package org.kuali.student.common.ui.client.widgets.table.summary;
2
3 import org.kuali.student.common.ui.client.configurable.mvc.FieldDescriptor;
4 import org.kuali.student.r1.common.assembly.data.MetadataInterrogator;
5
6 public class SummaryTableFieldRow extends SummaryTableRow{
7 private FieldDescriptor fieldDescriptor1;
8 private FieldDescriptor fieldDescriptor2;
9 private boolean temporary = false;
10
11 public SummaryTableFieldRow(){
12 this.setContentCellCount(2);
13 }
14
15 public SummaryTableFieldRow(FieldDescriptor fieldDescriptor1,
16 FieldDescriptor fieldDescriptor2){
17 this.fieldDescriptor1 = fieldDescriptor1;
18 this.setKey(fieldDescriptor1.getFieldKey());
19 this.setCell1(fieldDescriptor1.getFieldWidget());
20 this.setTitle(fieldDescriptor1.getFieldLabel());
21 this.setRequired(MetadataInterrogator.isRequired(fieldDescriptor1.getMetadata()) ||
22 MetadataInterrogator.isRequiredForNextState(fieldDescriptor1.getMetadata()));
23
24 this.fieldDescriptor2 = fieldDescriptor2;
25 this.setCell2(fieldDescriptor2.getFieldWidget());
26 this.setContentCellCount(2);
27 }
28
29 public FieldDescriptor getFieldDescriptor1(){
30 return fieldDescriptor1;
31 }
32 public FieldDescriptor getFieldDescriptor2(){
33 return fieldDescriptor2;
34 }
35
36
37
38
39
40
41 protected void setTemporaryRowFlag(boolean multiplicityRow) {
42 this.temporary = multiplicityRow;
43 }
44
45 protected boolean isTemporaryRow() {
46 return temporary;
47 }
48
49 }