View Javadoc

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.control;
17  
18  /**
19   * Represents a HTML Checkbox control. Typically used for boolean attributes (where the
20   * value is either on/off, true/false)
21   * 
22   * @author Kuali Rice Team (rice.collab@kuali.org)
23   */
24  public class CheckboxControl extends ControlBase implements ValueConfiguredControl {
25      private static final long serialVersionUID = -1397028958569144230L;
26  
27      private String value;
28  
29      public CheckboxControl() {
30         super();
31  	}
32  
33      /**
34       * The value that will be submitted when the checkbox control is checked
35       *
36       * <p>
37       * Value can be left blank, in which case the checkbox will submit a boolean value that
38       * will populate a boolean property. In cases where the checkbox needs to submit another value (for
39       * instance possibly in the checkbox group) the value can be set which will override the default.
40       * </p>
41       *
42       * @return String value for checkbox
43       */
44      public String getValue() {
45          return value;
46      }
47  
48      /**
49       * Setter for the value that should be submitted when the checkbox is checked
50       *
51       * @param value
52       */
53      public void setValue(String value) {
54          this.value = value;
55      }
56  }