1 /** 2 * Copyright 2005-2012 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 private String checkboxLabel; 29 30 public CheckboxControl() { 31 super(); 32 } 33 34 /** 35 * The value that will be submitted when the checkbox control is checked 36 * 37 * <p> 38 * Value can be left blank, in which case the checkbox will submit a boolean value that 39 * will populate a boolean property. In cases where the checkbox needs to submit another value (for 40 * instance possibly in the checkbox group) the value can be set which will override the default. 41 * </p> 42 * 43 * @return String value for checkbox 44 */ 45 public String getValue() { 46 return value; 47 } 48 49 /** 50 * Setter for the value that should be submitted when the checkbox is checked 51 * 52 * @param value 53 */ 54 public void setValue(String value) { 55 this.value = value; 56 } 57 58 public String getCheckboxLabel() { 59 return checkboxLabel; 60 } 61 62 public void setCheckboxLabel(String checkboxLabel) { 63 this.checkboxLabel = checkboxLabel; 64 } 65 }