1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.options;
17
18 import org.kuali.rice.core.api.util.ConcreteKeyValue;
19 import org.kuali.rice.core.api.util.KeyValue;
20 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
21
22 import java.util.ArrayList;
23 import java.util.List;
24
25
26
27
28 public class SimpleTestKeyValues extends KeyValuesBase {
29
30 private boolean blankOption;
31
32
33
34
35
36
37
38 @Override
39 public List<KeyValue> getKeyValues() {
40 List<KeyValue> keyValues = new ArrayList<KeyValue>();
41
42 if (blankOption) {
43 keyValues.add(new ConcreteKeyValue("", ""));
44 }
45
46 keyValues.add(new ConcreteKeyValue("1", "Option 1"));
47 keyValues.add(new ConcreteKeyValue("2", "Option 2"));
48 keyValues.add(new ConcreteKeyValue("3", "Option 3"));
49 ConcreteKeyValue disabledKeyValue = new ConcreteKeyValue("4", "Disabled Option 4");
50 disabledKeyValue.setDisabled(true);
51 keyValues.add(disabledKeyValue);
52 keyValues.add(new ConcreteKeyValue("5", "Option 5"));
53
54 return keyValues;
55 }
56
57
58
59
60 public boolean isBlankOption() {
61 return this.blankOption;
62 }
63
64
65
66
67 public void setBlankOption(boolean blankOption) {
68 this.blankOption = blankOption;
69 }
70
71 }