1 /**
2 * Copyright 2005-2015 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krad.uif.util;
17
18 /**
19 * An object that represents a simple suggestion with a label and a value. For use when returning a suggestion without
20 * specifying valuePropertyName or labelPropertyName on the Suggest widget. This class is also available for
21 * extension purposes.
22 */
23 public class SimpleSuggestObject {
24 private String label;
25 private String value;
26
27 /**
28 * Create a SimpleSuggestObject
29 *
30 * @param label the label to show for the suggestion
31 * @param value the value to insert when the label is selected
32 */
33 public SimpleSuggestObject(String label, String value){
34 this.label = label;
35 this.value = value;
36 }
37
38 /**
39 * The label of the suggestion
40 *
41 * @return the label
42 */
43 public String getLabel() {
44 return label;
45 }
46
47 /**
48 * Set the label
49 *
50 * @param label
51 */
52 public void setLabel(String label) {
53 this.label = label;
54 }
55
56 /**
57 * The value of the suggestion (inserted when the suggestion is picked)
58 *
59 * @return the value
60 */
61 public String getValue() {
62 return value;
63 }
64
65 /**
66 * Set the value
67 *
68 * @param value
69 */
70 public void setValue(String value) {
71 this.value = value;
72 }
73 }