View Javadoc
1   /**
2    * Copyright 2005-2014 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.core.api.util.AbstractKeyValue;
19  import org.kuali.rice.krad.datadictionary.parse.BeanTag;
20  import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
21  
22  /**
23   * KeyValue that has an additional label property for hierarchical dropdowns.
24   *
25   * @author Kuali Rice Team (rice.collab@kuali.org)
26   */
27  @BeanTag(name = "optionGroupLabel-bean", parent = "Uif-OptionGroupLabel")
28  public class UifOptionGroupLabel extends AbstractKeyValue {
29      private static final long serialVersionUID = -839111602450208876L;
30  
31      private String label;
32  
33      /**
34       * Base constructor
35       */
36      public UifOptionGroupLabel() {
37          super();
38          this.key = "NA";
39          this.value = "NA";
40      }
41  
42      public UifOptionGroupLabel(String label) {
43          this.key = "NA";
44          this.value = "NA";
45          this.label = label;
46      }
47  
48      /**
49       * Get the label for the option group.
50       *
51       * @return the label
52       */
53      @BeanTagAttribute(name = "label")
54      public String getLabel() {
55          return label;
56      }
57  
58      /**
59       * @see #getLabel()
60       */
61      public void setLabel(String label) {
62          this.label = label;
63      }
64  
65  }