Package org.kuali.rice.krad.uif.control
Class ControlBase
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,Control,ContentElement,LifecycleElement,org.springframework.core.Ordered
- Direct Known Subclasses:
CheckboxControl,FileControl,HiddenControl,MultiValueControlBase,PasswordControl,TextAreaControl,TextControlBase
Base class for all
Control implementations.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptionsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCodeFields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.final StringThe name for the component typeControl names to add handlers to for disable functionality, cannot be setGet the disable condition js derived from the springEL, cannot be set.If the control is disabled, gives a reason for why which will be displayed as a tooltip on the controlGets the property names of fields that when changed, will disable this componentGets the property names of fields that when changed, will enable this componentintUnique index of the control within the tab orderbooleanIndicates whether the control is disabled (doesn't allow input)booleanEvaluate the disable condition on controls which disable it on each key up eventvoidperformApplyModel(Object model, LifecycleElement parent) Sets the disabledExpression, if any, evaluates it and sets the disabled propertyvoidperformFinalize(Object model, LifecycleElement parent) Parses the disabled expressions, if any, to equivalent javascript and evaluates the disable/enable when changed property names.voidsetDisabled(boolean disabled) Setter for the disabled indicatorprotected voidsetDisabledConditionControlNames(List<String> disabledConditionControlNames) Sets the disabled condition control namesprotected voidsetDisabledConditionJs(String disabledConditionJs) Sets the disabled condition javascriptprotected voidsetDisabledExpression(String disabledExpression) Sets the disabled expressionvoidsetDisabledReason(String disabledReason) Setter for the disabled reason textvoidsetDisabledWhenChangedPropertyNames(List<String> disabledWhenChangedPropertyNames) Sets the property names of fields that when changed, will disable this componentvoidsetEnabledWhenChangedPropertyNames(List<String> enabledWhenChangedPropertyNames) Sets the property names of fields that when changed, will enable this componentvoidsetEvaluateDisabledOnKeyUp(boolean evaluateDisabledOnKeyUp) Set evaluateDisableOnKeyUpvoidsetTabIndex(int tabIndex) Setter for the controls tab order indexMethods inherited from class org.kuali.rice.krad.uif.element.ContentElementBase
afterEvaluateExpressionMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.uif.component.Component
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, afterEvaluateExpression, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyleMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycleMethods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScriptMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Constructor Details
-
ControlBase
public ControlBase()
-
-
Method Details
-
performApplyModel
Sets the disabledExpression, if any, evaluates it and sets the disabled property- Specified by:
performApplyModelin interfaceLifecycleElement- Overrides:
performApplyModelin classComponentBase- Parameters:
model- top level object containing the data (could be the form or a top level business object, dto)parent-
-
performFinalize
Parses the disabled expressions, if any, to equivalent javascript and evaluates the disable/enable when changed property names.- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classComponentBase- Parameters:
model- top level object containing the dataparent- parent component
-
getComponentTypeName
The name for the component typeThis is used within the rendering layer to pass the component instance into the template. The component instance is exported under the name given by this method.
- Specified by:
getComponentTypeNamein interfaceComponent- Overrides:
getComponentTypeNamein classContentElementBase- Returns:
- String type name
-
getTabIndex
public int getTabIndex()Unique index of the control within the tab orderTab index provides a way to set the order users will tab through the controls. The control with index 1 will receive focus when the page is rendered. Tabing from the field will then take the user to the control with index 2, then index 3, and so on.
- Specified by:
getTabIndexin interfaceControl- Returns:
- int the tab index for the control
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:ControlSetter for the controls tab order index- Specified by:
setTabIndexin interfaceControl- Parameters:
tabIndex-- See Also:
-
isDisabled
public boolean isDisabled()Description copied from interface:ControlIndicates whether the control is disabled (doesn't allow input)- Specified by:
isDisabledin interfaceControl- Returns:
- boolean true if the control is disabled, false if not
- See Also:
-
setDisabled
public void setDisabled(boolean disabled) Description copied from interface:ControlSetter for the disabled indicator- Specified by:
setDisabledin interfaceControl- Parameters:
disabled-- See Also:
-
getDisabledReason
Description copied from interface:ControlIf the control is disabled, gives a reason for why which will be displayed as a tooltip on the control- Specified by:
getDisabledReasonin interfaceControl- Returns:
- String disabled reason text
- See Also:
-
setDisabledReason
Description copied from interface:ControlSetter for the disabled reason text- Specified by:
setDisabledReasonin interfaceControl- Parameters:
disabledReason-- See Also:
-
isEvaluateDisabledOnKeyUp
public boolean isEvaluateDisabledOnKeyUp()Evaluate the disable condition on controls which disable it on each key up event- Returns:
- true if evaluate on key up, false otherwise
-
setEvaluateDisabledOnKeyUp
public void setEvaluateDisabledOnKeyUp(boolean evaluateDisabledOnKeyUp) Set evaluateDisableOnKeyUp- Parameters:
evaluateDisabledOnKeyUp-
-
getDisabledConditionJs
Get the disable condition js derived from the springEL, cannot be set.- Returns:
- the disableConditionJs javascript to be evaluated
-
getDisabledConditionControlNames
Control names to add handlers to for disable functionality, cannot be set- Returns:
- control names to add handlers to for disable
-
getDisabledWhenChangedPropertyNames
Gets the property names of fields that when changed, will disable this component- Returns:
- the property names to monitor for change to disable this component
-
setDisabledWhenChangedPropertyNames
Sets the property names of fields that when changed, will disable this component- Parameters:
disabledWhenChangedPropertyNames-
-
getEnabledWhenChangedPropertyNames
Gets the property names of fields that when changed, will enable this component- Returns:
- the property names to monitor for change to enable this component
-
setEnabledWhenChangedPropertyNames
Sets the property names of fields that when changed, will enable this component- Parameters:
enabledWhenChangedPropertyNames-
-
setDisabledExpression
Sets the disabled expression- Parameters:
disabledExpression-
-
setDisabledConditionJs
Sets the disabled condition javascript- Parameters:
disabledConditionJs-
-
setDisabledConditionControlNames
Sets the disabled condition control names- Parameters:
disabledConditionControlNames-
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Specified by:
completeValidationin interfaceComponent- Overrides:
completeValidationin classComponentBase- Parameters:
tracer- Record of component's location
-