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 import org.kuali.rice.krad.datadictionary.parse.BeanTag; 19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; 20 21 /** 22 * KeyValue that has an additional location property that takes a Url object. When this is used with a dropdown or 23 * an optionList control, those options become navigation controls. 24 */ 25 @BeanTag(name = "keyValueLocation-bean", parent = "Uif-KeyValueLocation") 26 public class UifKeyValueLocation extends UifKeyValue { 27 28 private UrlInfo location; 29 30 /** 31 * Base constructor 32 */ 33 public UifKeyValueLocation() { 34 super(); 35 } 36 37 public UifKeyValueLocation(String key, String value) { 38 super(key, value); 39 } 40 41 /** 42 * KeyValueLocation constructor 43 * 44 * @param key the key 45 * @param value the value 46 * @param location the url location object 47 */ 48 public UifKeyValueLocation(String key, String value, UrlInfo location) { 49 this.key = key; 50 this.value = value; 51 this.location = location; 52 } 53 54 /** 55 * Get the url object representing the location 56 * 57 * @return the url location object 58 */ 59 @BeanTagAttribute(name = "location", type = BeanTagAttribute.AttributeType.SINGLEBEAN) 60 public UrlInfo getLocation() { 61 return location; 62 } 63 64 /** 65 * Set the url location object 66 * 67 * @param location 68 */ 69 public void setLocation(UrlInfo location) { 70 this.location = location; 71 } 72 }