org.kuali.rice.krad.uif.control
Class CheckboxControl

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.component.ComponentBase
              extended by org.kuali.rice.krad.uif.element.ContentElementBase
                  extended by org.kuali.rice.krad.uif.control.ControlBase
                      extended by org.kuali.rice.krad.uif.control.CheckboxControl
All Implemented Interfaces:
Serializable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, Control, ValueConfiguredControl, ContentElement, 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:
Serialized Form

Field Summary
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
CheckboxControl()
           
 
Method Summary
 void completeValidation(ValidationTrace tracer)
          Validates different requirements of component compiling a series of reports detailing information on errors found in the component.
 String getCheckboxLabel()
          Returns the label text for this checkbox
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 List<Component> getInlineComponents()
          Gets the inlineComponents used by index in the checkboxLabel that has rich message component index tags
 Message getRichLabelMessage()
          Gets the Message that represents the rich message content of the label if labelText is using rich message tags.
 String getValue()
          The value that will be submitted when the checkbox control is checked
 void performApplyModel(View view, Object model, Component parent)
          Sets up rich message content for the label, if any exists
 void setCheckboxLabel(String checkboxLabel)
          Sets the label text for this checkbox
 void setInlineComponents(List<Component> inlineComponents)
          Sets the inlineComponents used by index in the checkboxLabel that has rich message component index tags
 void setRichLabelMessage(Message richLabelMessage)
          Sets the Message that represents the rich message content of the label if it is using rich message tags.
 void setValue(String value)
          Setter for the value that should be submitted when the checkbox is checked
 
Methods inherited from class org.kuali.rice.krad.uif.control.ControlBase
getComplexDataAttributesJs, getComponentTypeName, getDisabledConditionControlNames, getDisabledConditionJs, getDisabledReason, getDisabledWhenChangedPropertyNames, getEnabledWhenChangedPropertyNames, getTabIndex, isDisabled, isEvaluateDisabledOnKeyUp, performFinalize, setDisabled, setDisabledReason, setDisabledWhenChangedPropertyNames, setEnabledWhenChangedPropertyNames, setEvaluateDisabledOnKeyUp, setTabIndex
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAlign, getAllDataAttributesJs, getBaseId, getCellCssClasses, getCellStyleClassesAsString, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setCellCssClasses, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addCellCssClass, addDataAttribute, addStyleClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAllDataAttributesJs, getBaseId, getCellCssClasses, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, performInitialization, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setBaseId, setCellCssClasses, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnLoadScript
 

Constructor Detail

CheckboxControl

public CheckboxControl()
Method Detail

performApplyModel

public void performApplyModel(View view,
                              Object model,
                              Component parent)
Sets up rich message content for the label, if any exists

Specified by:
performApplyModel in interface Component
Overrides:
performApplyModel in class ControlBase
Parameters:
view - - view instance to which the component belongs
model - - Top level object containing the data (could be the form or a
See Also:
Component.performApplyModel(org.kuali.rice.krad.uif.view.View, Object, org.kuali.rice.krad.uif.component.Component)

getComponentsForLifecycle

public List<Component> getComponentsForLifecycle()
Description copied from interface: Component
List of components that are contained within the component and should be sent through the lifecycle

Used by ViewHelperService for the various lifecycle callbacks

Specified by:
getComponentsForLifecycle in interface Component
Overrides:
getComponentsForLifecycle in class ComponentBase
Returns:
List child components
See Also:
ComponentBase.getComponentsForLifecycle()

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:
String 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:
String representing the checkbox label text

setCheckboxLabel

public void setCheckboxLabel(String checkboxLabel)
Sets the label text for this checkbox

Parameters:
checkboxLabel - - String containing the label text

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)
Description copied from interface: Component
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
See Also:
Component.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.