001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.uif.util; 017 018/** 019 * An object that represents a simple suggestion with a label and a value. For use when returning a suggestion without 020 * specifying valuePropertyName or labelPropertyName on the Suggest widget. This class is also available for 021 * extension purposes. 022 */ 023public class SimpleSuggestObject { 024 private String label; 025 private String value; 026 027 /** 028 * Create a SimpleSuggestObject 029 * 030 * @param label the label to show for the suggestion 031 * @param value the value to insert when the label is selected 032 */ 033 public SimpleSuggestObject(String label, String value){ 034 this.label = label; 035 this.value = value; 036 } 037 038 /** 039 * The label of the suggestion 040 * 041 * @return the label 042 */ 043 public String getLabel() { 044 return label; 045 } 046 047 /** 048 * Set the label 049 * 050 * @param label 051 */ 052 public void setLabel(String label) { 053 this.label = label; 054 } 055 056 /** 057 * The value of the suggestion (inserted when the suggestion is picked) 058 * 059 * @return the value 060 */ 061 public String getValue() { 062 return value; 063 } 064 065 /** 066 * Set the value 067 * 068 * @param value 069 */ 070 public void setValue(String value) { 071 this.value = value; 072 } 073}