org.kuali.rice.krad.uif.field
Class LookupInputField
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
org.kuali.rice.krad.uif.component.ComponentBase
org.kuali.rice.krad.uif.field.FieldBase
org.kuali.rice.krad.uif.field.DataField
org.kuali.rice.krad.uif.field.InputField
org.kuali.rice.krad.uif.field.LookupInputField
- All Implemented Interfaces:
- Serializable, DictionaryBean, UifDictionaryBean, CaseConstrainable, Constrainable, MustOccurConstrainable, PrerequisiteConstrainable, SimpleConstrainable, ValidCharactersConstrainable, Component, DataBinding, ScriptEventSupport, Field, Helpable, org.springframework.core.Ordered
public class LookupInputField
- extends InputField
Custom InputField
for search fields within a lookup view
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
- Serialized Form
Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Method Summary |
protected static Control |
convertControlToLookupControl(AttributeDefinition attributeDefinition)
If control definition is defined on the given attribute definition, converts to an appropriate control for
searching (if necessary) and returns a copy for setting on the field |
void |
copyFromAttributeDefinition(View view,
AttributeDefinition attributeDefinition)
Override of InputField copy to setup properties necessary to make the field usable for inputting
search criteria |
Map<String,String> |
filterSearchCriteria(Map<String,String> searchCriteria)
Remove any search criteria that are not part of the database lookup |
List<Component> |
getComponentPrototypes()
Add radioGroupControl if the control is a checkbox control |
RadioGroupControl |
getRadioGroupControl()
The radio group control prototype that will replace the checkbox control |
boolean |
isAddControlSelectAllOption()
Indicates whether the option for all values (blank key, 'All' label) should be added to the lookup
field, note this is only supported for MultiValueControl instance |
boolean |
isDisableWildcardsAndOperators()
|
boolean |
isRanged()
Indicates that a field must be rendered as a from and to value |
void |
performApplyModel(View view,
Object model,
Component parent)
Replace checkbox control with radio group control |
void |
performFinalize(View view,
Object model,
Component parent)
The following actions are performed:
Add all option if enabled and control is multi-value
|
void |
setAddControlSelectAllOption(boolean addControlSelectAllOption)
Setter for the add all option indicator |
void |
setDisableWildcardsAndOperators(boolean disableWildcardsAndOperators)
|
void |
setRadioGroupControl(RadioGroupControl radioGroupControl)
Setter for the radio group control |
void |
setRanged(boolean ranged)
Setter for ranged flag to indicate this is a range field |
Methods inherited from class org.kuali.rice.krad.uif.field.InputField |
adjustMustOccurConstraintBinding, adjustPrerequisiteConstraintBinding, completeValidation, getAttributeQuery, getCaseConstraint, getComponentsForLifecycle, getConstraintMessage, getConstraintText, getControl, getDataType, getDependencyConstraints, getExclusiveMin, getInclusiveMax, getInstructionalMessage, getInstructionalText, getMaxLength, getMinLength, getMustOccurConstraints, getName, getOptionsFinder, getOptionsFinderClass, getPrerequisiteConstraints, getQuickfinder, getRequired, getSimpleConstraint, getSuggest, getValidationMessages, getValidCharactersConstraint, isInputAllowed, isRenderFieldset, isUppercaseValue, performInitialization, processReadOnlyListDisplay, setAttributeQuery, setCaseConstraint, setConstraintMessage, setConstraintText, setControl, setDataType, setDataType, setDependencyConstraints, setExclusiveMin, setInclusiveMax, setInstructionalMessage, setInstructionalText, setMaxLength, setMinLength, setMustOccurConstraints, setOptionsFinder, setOptionsFinderClass, setQuickfinder, setRequired, setSimpleConstraint, setSuggest, setupFieldQuery, setupIds, setUppercaseValue, setValidationMessages, setValidCharactersConstraint |
Methods inherited from class org.kuali.rice.krad.uif.field.DataField |
generateReadOnlyListDisplayReplacement, getAdditionalHiddenPropertyNames, getBindingInfo, getComponentSecurityClass, getDataFieldSecurity, getDefaultValue, getDefaultValueFinderClass, getDefaultValues, getDictionaryAttributeName, getDictionaryObjectEntry, getHelp, getHelpSummary, getHelpTitle, getInquiry, getMaskFormatter, getPropertyEditor, getPropertyName, getPropertyNamesForAdditionalDisplay, getReadOnlyDisplayReplacement, getReadOnlyDisplayReplacementPropertyName, getReadOnlyDisplaySuffix, getReadOnlyDisplaySuffixPropertyName, getReadOnlyListDelimiter, getReadOnlyListDisplayType, hasSecureValue, isAddHiddenWhenReadOnly, isApplyMask, isEscapeHtmlInPropertyValue, isMultiLineReadOnlyDisplay, setAddHiddenWhenReadOnly, setAdditionalHiddenPropertyNames, setAlternateAndAdditionalDisplayValue, setApplyMask, setBindingInfo, setComponentSecurity, setDefaultValue, setDefaultValueFinderClass, setDefaultValues, setDictionaryAttributeName, setDictionaryObjectEntry, setEscapeHtmlInPropertyValue, setHelp, setHelpSummary, setInquiry, setMaskFormatter, setMultiLineReadOnlyDisplay, setPropertyEditor, setPropertyEditorClass, setPropertyName, setPropertyNamesForAdditionalDisplay, setReadOnlyDisplayReplacement, setReadOnlyDisplayReplacementPropertyName, setReadOnlyDisplaySuffix, setReadOnlyDisplaySuffixPropertyName, setReadOnlyListDelimiter, setReadOnlyListDisplayType, setTooltipOfComponent |
Methods inherited from class org.kuali.rice.krad.uif.field.FieldBase |
getComponentTypeName, getFieldLabel, getFieldSecurity, getLabel, getLabelColSpan, getLabelPlacement, getLabelStyleClasses, getShortLabel, isLabelRendered, setFieldLabel, setLabel, setLabelColSpan, setLabelPlacement, setLabelRendered, setLabelStyleClasses, setNestedComponentIdAndSuffix, setShortLabel, setShowLabel |
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase |
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAlign, getAllDataAttributesJs, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentSecurity, 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, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, 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, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth |
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, getAlign, getAllDataAttributesJs, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth |
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 |
LookupInputField
public LookupInputField()
performApplyModel
public void performApplyModel(View view,
Object model,
Component parent)
- Replace checkbox control with radio group control
- Specified by:
performApplyModel
in interface Component
- Overrides:
performApplyModel
in class InputField
- Parameters:
view
- - view instance to which the component belongsmodel
- - Top level object containing the data (could be the form or a
top level business object, dto)- See Also:
Component.performApplyModel(org.kuali.rice.krad.uif.view.View, Object,
org.kuali.rice.krad.uif.component.Component)
performFinalize
public void performFinalize(View view,
Object model,
Component parent)
- The following actions are performed:
- Add all option if enabled and control is multi-value
- Specified by:
performFinalize
in interface Component
- Overrides:
performFinalize
in class InputField
- Parameters:
view
- - view instance that should be finalized for renderingmodel
- - top level object containing the dataparent
- - parent component- See Also:
ComponentBase.performFinalize(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
getComponentPrototypes
public List<Component> getComponentPrototypes()
- Add radioGroupControl if the control is a checkbox control
- Specified by:
getComponentPrototypes
in interface Component
- Overrides:
getComponentPrototypes
in class ComponentBase
- Returns:
- List child component prototypes
- See Also:
Component.getPropertyReplacers()
copyFromAttributeDefinition
public void copyFromAttributeDefinition(View view,
AttributeDefinition attributeDefinition)
- Override of InputField copy to setup properties necessary to make the field usable for inputting
search criteria
- Overrides:
copyFromAttributeDefinition
in class InputField
- Parameters:
attributeDefinition
- - AttributeDefinition instance the property values should be copied fromview
- - view instance the field belongs to- See Also:
DataField.copyFromAttributeDefinition(org.kuali.rice.krad.uif.view.View,
org.kuali.rice.krad.datadictionary.AttributeDefinition)
convertControlToLookupControl
protected static Control convertControlToLookupControl(AttributeDefinition attributeDefinition)
- If control definition is defined on the given attribute definition, converts to an appropriate control for
searching (if necessary) and returns a copy for setting on the field
- Parameters:
attributeDefinition
- - attribute definition instance to retrieve control from
- Returns:
- Control instance or null if not found
isDisableWildcardsAndOperators
public boolean isDisableWildcardsAndOperators()
- Returns:
- the treatWildcardsAndOperatorsAsLiteral
setDisableWildcardsAndOperators
public void setDisableWildcardsAndOperators(boolean disableWildcardsAndOperators)
- Parameters:
disableWildcardsAndOperators
- the treatWildcardsAndOperatorsAsLiteral to set
isAddControlSelectAllOption
public boolean isAddControlSelectAllOption()
- Indicates whether the option for all values (blank key, 'All' label) should be added to the lookup
field, note this is only supported for
MultiValueControl
instance
- Returns:
- boolean true if all option should be added, false if not
setAddControlSelectAllOption
public void setAddControlSelectAllOption(boolean addControlSelectAllOption)
- Setter for the add all option indicator
- Parameters:
addControlSelectAllOption
-
getRadioGroupControl
public RadioGroupControl getRadioGroupControl()
- The radio group control prototype that will replace the checkbox control
- Returns:
- RadioGroupControl
setRadioGroupControl
public void setRadioGroupControl(RadioGroupControl radioGroupControl)
- Setter for the radio group control
- Parameters:
radioGroupControl
-
isRanged
public boolean isRanged()
- Indicates that a field must be rendered as a from and to value
- Returns:
setRanged
public void setRanged(boolean ranged)
- Setter for ranged flag to indicate this is a range field
- Parameters:
ranged
-
filterSearchCriteria
public Map<String,String> filterSearchCriteria(Map<String,String> searchCriteria)
- Remove any search criteria that are not part of the database lookup
- Parameters:
searchCriteria
- the search criteria to be filtered
- Returns:
- the filteredSearchCriteria
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.