001/**
002 * Copyright 2005-2016 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.control;
017
018/**
019 * Represents a HTML Checkbox control. Typically used for boolean attributes (where the
020 * value is either on/off, true/false)
021 * 
022 * @author Kuali Rice Team (rice.collab@kuali.org)
023 */
024public class CheckboxControl extends ControlBase implements ValueConfiguredControl {
025    private static final long serialVersionUID = -1397028958569144230L;
026
027    private String value;
028
029    public CheckboxControl() {
030       super();
031        }
032
033    /**
034     * The value that will be submitted when the checkbox control is checked
035     *
036     * <p>
037     * Value can be left blank, in which case the checkbox will submit a boolean value that
038     * will populate a boolean property. In cases where the checkbox needs to submit another value (for
039     * instance possibly in the checkbox group) the value can be set which will override the default.
040     * </p>
041     *
042     * @return String value for checkbox
043     */
044    public String getValue() {
045        return value;
046    }
047
048    /**
049     * Setter for the value that should be submitted when the checkbox is checked
050     *
051     * @param value
052     */
053    public void setValue(String value) {
054        this.value = value;
055    }
056}