1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.util;
17
18
19
20
21 public class GroupKeyLookupInputField extends org.kuali.rice.krad.uif.field.LookupInputField implements SingleGroupKeyField {
22 String singleGroupKey = null;
23 public void singleGroupKeyCheck()
24 {
25 if (TKUtils.singleGroupKeyExists())
26 {
27 singleGroupKey = TKUtils.getSingleGroupKey();
28 }
29 }
30
31
32 public GroupKeyLookupInputField() {
33 super();
34
35 singleGroupKeyCheck();
36 }
37
38 public boolean isReadOnly() {
39 if (TKUtils.singleGroupKeyExists())
40 {
41 return true;
42 }
43
44 return super.isReadOnly();
45 }
46
47 public String getForcedValue() {
48 if (TKUtils.singleGroupKeyExists())
49 {
50 return singleGroupKey;
51 }
52
53 return super.getForcedValue();
54 }
55
56 public boolean isAddHiddenWhenReadOnly() {
57 if (TKUtils.singleGroupKeyExists())
58 {
59 return true;
60 }
61
62 return super.isAddHiddenWhenReadOnly();
63 }
64
65 public String getDefaultValue() {
66 if (TKUtils.singleGroupKeyExists())
67 {
68 return singleGroupKey;
69 }
70
71 return super.getDefaultValue();
72 }
73 }