Class CheckboxControl

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, Component, Ordered, ScriptEventSupport, Control, ValueConfiguredControl, ContentElement, LifecycleElement, org.springframework.core.Ordered

public class CheckboxControl extends ControlBase implements ValueConfiguredControl
Represents a HTML Checkbox control. Typically used for boolean attributes (where the value is either on/off, true/false)
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • CheckboxControl

      public CheckboxControl()
  • Method Details

    • performApplyModel

      public void performApplyModel(Object model, LifecycleElement parent)
      Sets up rich message content for the label, if any exists Sets the disabledExpression, if any, evaluates it and sets the disabled property
      Specified by:
      performApplyModel in interface LifecycleElement
      Overrides:
      performApplyModel in class ControlBase
      Parameters:
      model - top level object containing the data (could be the form or a top level business object, dto)
      parent -
    • getValue

      public String getValue()
      The value that will be submitted when the checkbox control is checked

      Value can be left blank, in which case the checkbox will submit a boolean value that will populate a boolean property. In cases where the checkbox needs to submit another value (for instance possibly in the checkbox group) the value can be set which will override the default.

      Specified by:
      getValue in interface ValueConfiguredControl
      Returns:
      value for checkbox
    • setValue

      public void setValue(String value)
      Setter for the value that should be submitted when the checkbox is checked
      Specified by:
      setValue in interface ValueConfiguredControl
      Parameters:
      value -
    • getCheckboxLabel

      public String getCheckboxLabel()
      Returns the label text for this checkbox
      Returns:
      the checkbox label text
    • setCheckboxLabel

      public void setCheckboxLabel(String checkboxLabel)
      Sets the label text for this checkbox
      Parameters:
      checkboxLabel - the label text
    • setChecked

      public void setChecked(boolean checked)
      Sets the checked state.
      Parameters:
      checked - - boolean true = checked, false = not checked
    • isChecked

      public boolean isChecked()
      Returns true if checked, false if not checked.
      Returns:
      true if checked
    • getRichLabelMessage

      public Message getRichLabelMessage()
      Gets the Message that represents the rich message content of the label if labelText is using rich message tags. DO NOT set this property directly unless you need full control over the message structure.
      Returns:
      Message with rich message structure, null if no rich message structure
    • setRichLabelMessage

      public void setRichLabelMessage(Message richLabelMessage)
      Sets the Message that represents the rich message content of the label if it is using rich message tags. DO NOT set this property directly unless you need full control over the message structure.
      Parameters:
      richLabelMessage -
    • getInlineComponents

      public List<Component> getInlineComponents()
      Gets the inlineComponents used by index in the checkboxLabel that has rich message component index tags
      Returns:
      the Label's inlineComponents
    • setInlineComponents

      public void setInlineComponents(List<Component> inlineComponents)
      Sets the inlineComponents used by index in the checkboxLabel that has rich message component index tags
      Parameters:
      inlineComponents -
    • completeValidation

      public void completeValidation(ValidationTrace tracer)
      Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.
      Specified by:
      completeValidation in interface Component
      Overrides:
      completeValidation in class ControlBase
      Parameters:
      tracer - Record of component's location