Package org.kuali.rice.krad.lookup
Class LookupInputField
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,CaseConstrainable,Constrainable,MustOccurConstrainable,PrerequisiteConstrainable,SimpleConstrainable,ValidCharactersConstrainable,Component,DataBinding,Ordered,ScriptEventSupport,DataField,Field,InputField,LifecycleElement,Helpable,org.springframework.core.Ordered
Custom
InputField for criteria fields within a lookup view that adds criteria specific options.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.uif.field.DataFieldBase
readOnlyDisplayReplacementPropertyName, readOnlyDisplaySuffixPropertyNameFields 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 TypeMethodDescriptionprotected voidInvoked during the finalize phase to capture state of the component needs to support post operations.protected voidAdd hidden search criteria components.protected static ControlconvertControlToLookupControl(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.voidcopyFromAttributeDefinition(AttributeDefinition attributeDefinition) Override of InputField copy to setup properties necessary to make the field usable for inputting search criteria.filterSearchCriteria(Map<String, String> searchCriteria) Invoked before search is carried out to perform any necessary filtering of the criteria.booleanIndicates whether the option for all values (blank key, 'All' label) should be added to the lookup field, note this is only supported forMultiValueControlinstance.booleanIndicates whether wildcard and other search operators should be disabled (treated as literals) for the input field.booleanisRanged()Indicates a field group should be created containing a from and to input field for date search ranges.voidperformFinalize(Object model, LifecycleElement parent) The following actions are performed: Add all option if enabled and control is multi-value The following finalization is performed: Set the labelForComponentId to this component id Set the label text on the label field from the field's label property Set the render property on the label's required message field if this field is marked as required The following finalization is done here: progressiveRender and conditionalRefresh variables are processed if set If any of the style properties were given, sets the style string on the style property Set the skipInTabOrder flag for nested components The last phase before the view is renderedvoidsetAddControlSelectAllOption(boolean addControlSelectAllOption) voidsetDisableWildcardsAndOperators(boolean disableWildcardsAndOperators) voidsetRanged(boolean ranged) Methods inherited from class org.kuali.rice.krad.uif.field.InputFieldBase
addPostInputAddon, adjustMustOccurConstraintBinding, adjustPrerequisiteConstraintBinding, afterEvaluateExpression, completeValidation, getAttributeQuery, getCaseConstraint, getConstraintMessage, getConstraintText, getControl, getDataType, getDependencyConstraints, getExclusiveMin, getHelperText, getInclusiveMax, getInstructionalMessage, getInstructionalText, getMaxLength, getMinLength, getMustOccurConstraints, getOptionsFinder, getOptionsFinderClass, getPostInputAddons, getPostInputCssClasses, getPostInputCssClassesAsString, getPrerequisiteConstraints, getQuickfinder, getRequired, getSimpleConstraint, getSuggest, getValidationMessages, getValidCharactersConstraint, hasAutoQuickfinderRelationship, isAjaxInlineEdit, isDisableNativeAutocomplete, isEnableAutoDirectInquiry, isEnableAutoQuickfinder, isInlineEdit, isInputAllowed, isRenderFieldset, isRenderInputAddonGroup, isUppercaseValue, isWidgetInputOnly, performApplyModel, performInitialization, processReadOnlyListDisplay, setAjaxInlineEdit, setAlternateAndAdditionalDisplayValue, setAttributeQuery, setCaseConstraint, setConstraintMessage, setConstraintText, setControl, setDataType, setDataType, setDependencyConstraints, setDisableNativeAutocomplete, setEnableAutoDirectInquiry, setEnableAutoQuickfinder, setExclusiveMin, setHelperText, setInclusiveMax, setInlineEdit, setInstructionalMessage, setInstructionalText, setMaxLength, setMinLength, setMustOccurConstraints, setOptionsFinder, setOptionsFinderClass, setPostInputAddons, setPostInputCssClasses, setQuickfinder, setRenderInputAddonGroup, setRequired, setSimpleConstraint, setSuggest, setupFieldQuery, setupIds, setUppercaseValue, setValidationMessages, setValidCharactersConstraint, setWidgetInputOnlyMethods inherited from class org.kuali.rice.krad.uif.field.DataFieldBase
generateReadOnlyListDisplayReplacement, getAdditionalHiddenPropertyNames, getBindingInfo, getDataFieldSecurity, getDefaultValue, getDefaultValueFinderClass, getDefaultValues, getDictionaryAttributeName, getDictionaryObjectEntry, getForcedValue, getHelp, getHelpSummary, getHelpTitle, getInquiry, getMaskFormatter, getName, getPropertyEditor, getPropertyName, getPropertyNamesForAdditionalDisplay, getReadOnlyDisplayReplacement, getReadOnlyDisplayReplacementPropertyName, getReadOnlyDisplaySuffix, getReadOnlyDisplaySuffixPropertyName, getReadOnlyListDelimiter, getReadOnlyListDisplayType, getSortAs, hasAutoInquiryRelationship, hasSecureValue, initializeComponentSecurity, isAddHiddenWhenReadOnly, isApplyMask, isEnableAutoInquiry, isEscapeHtmlInPropertyValue, isMultiLineReadOnlyDisplay, isRenderInfoMessageSpan, isRenderMarkerIconSpan, setAddHiddenWhenReadOnly, setAdditionalHiddenPropertyNames, setApplyMask, setBindingInfo, setComponentSecurity, setDefaultValue, setDefaultValueFinderClass, setDefaultValues, setDictionaryAttributeName, setDictionaryObjectEntry, setEnableAutoInquiry, setEscapeHtmlInPropertyValue, setForcedValue, setHelp, setHelpSummary, setInquiry, setMaskFormatter, setMultiLineReadOnlyDisplay, setPropertyEditor, setPropertyEditorClass, setPropertyName, setPropertyNamesForAdditionalDisplay, setReadOnlyDisplayReplacement, setReadOnlyDisplayReplacementPropertyName, setReadOnlyDisplaySuffix, setReadOnlyDisplaySuffixPropertyName, setReadOnlyListDelimiter, setReadOnlyListDisplayType, setRenderInfoMessageSpan, setRenderMarkerIconSpan, setSortAs, setTooltipOfComponentMethods inherited from class org.kuali.rice.krad.uif.field.FieldBase
getComponentTypeName, getFieldLabel, getFieldSecurity, getLabel, getLabelColSpan, getLabelStyleClasses, getShortLabel, isEditInLineAuthz, isLabelLeft, isLabelRendered, isViewInLineAuthz, setEditInLineAuthz, setFieldLabel, setLabel, setLabelColSpan, setLabelLeft, setLabelRendered, setLabelStyleClasses, setNestedComponentIdAndSuffix, setShortLabel, setShowLabel, setViewInLineAuthzMethods 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, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, 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, 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, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getComponentTypeName, 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, 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, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, 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.validation.capability.Constrainable
getNameMethods inherited from interface org.kuali.rice.krad.uif.component.DataBinding
getBindingInfo, getPropertyName, setBindingInfoMethods inherited from interface org.kuali.rice.krad.uif.field.DataField
getAdditionalHiddenPropertyNames, getDataFieldSecurity, getDefaultValue, getDefaultValueFinderClass, getDefaultValues, getDictionaryAttributeName, getDictionaryObjectEntry, getForcedValue, getHelpSummary, getInquiry, getMaskFormatter, getName, getPropertyEditor, getPropertyNamesForAdditionalDisplay, getReadOnlyDisplayReplacement, getReadOnlyDisplayReplacementPropertyName, getReadOnlyDisplaySuffix, getReadOnlyDisplaySuffixPropertyName, getReadOnlyListDelimiter, getReadOnlyListDisplayType, getSortAs, hasSecureValue, isAddHiddenWhenReadOnly, isApplyMask, isEnableAutoInquiry, isEscapeHtmlInPropertyValue, isMultiLineReadOnlyDisplay, isRenderInfoMessageSpan, isRenderMarkerIconSpan, setAddHiddenWhenReadOnly, setAdditionalHiddenPropertyNames, setApplyMask, setComponentSecurity, setDefaultValue, setDefaultValueFinderClass, setDefaultValues, setDictionaryAttributeName, setDictionaryObjectEntry, setEnableAutoInquiry, setEscapeHtmlInPropertyValue, setForcedValue, setHelpSummary, setInquiry, setMaskFormatter, setMultiLineReadOnlyDisplay, setPropertyEditor, setPropertyEditorClass, setPropertyName, setPropertyNamesForAdditionalDisplay, setReadOnlyDisplayReplacement, setReadOnlyDisplayReplacementPropertyName, setReadOnlyDisplaySuffix, setReadOnlyDisplaySuffixPropertyName, setReadOnlyListDelimiter, setReadOnlyListDisplayType, setRenderInfoMessageSpan, setRenderMarkerIconSpan, setSortAsMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.field.Field
getFieldLabel, getFieldSecurity, getLabel, getLabelColSpan, getLabelStyleClasses, getShortLabel, isLabelLeft, isLabelRendered, setFieldLabel, setLabel, setLabelColSpan, setLabelLeft, setLabelRendered, setLabelStyleClasses, setShortLabelMethods inherited from interface org.kuali.rice.krad.uif.widget.Helpable
getHelp, getHelpTitle, setHelp, setTooltipOfComponentMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, 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
-
LookupInputField
public LookupInputField()
-
-
Method Details
-
performFinalize
The following actions are performed:- Add all option if enabled and control is multi-value
- Set the labelForComponentId to this component id
- Set the label text on the label field from the field's label property
- Set the render property on the label's required message field if this field is marked as required
- progressiveRender and conditionalRefresh variables are processed if set
- If any of the style properties were given, sets the style string on the style property
- Set the skipInTabOrder flag for nested components
Here final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classInputFieldBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
addComponentPostMetadata
protected void addComponentPostMetadata()Invoked during the finalize phase to capture state of the component needs to support post operations.- Overrides:
addComponentPostMetadatain classInputFieldBase
-
addHiddenComponentPostMetadata
Add hidden search criteria components.- Parameters:
lookupCriteriaFields-
-
copyFromAttributeDefinition
Override of InputField copy to setup properties necessary to make the field usable for inputting search criteria.Note super is not being called because we don't want to add restirctions that can cause problems with the use of wildcard
Defaults the properties of theDataFieldto the corresponding properties of itsAttributeDefinitionretrieved from the dictionary (if such an entry exists). If the field already contains a value for a property, the definitions value is not used.- Specified by:
copyFromAttributeDefinitionin interfaceDataField- Overrides:
copyFromAttributeDefinitionin classInputFieldBase- Parameters:
attributeDefinition- AttributeDefinition instance the property values should be copied from
-
convertControlToLookupControl
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
-
filterSearchCriteria
Invoked before search is carried out to perform any necessary filtering of the criteria.- Parameters:
searchCriteria- the search criteria to be filtered- Returns:
- map of filtered search criteria
-
isDisableWildcardsAndOperators
public boolean isDisableWildcardsAndOperators()Indicates whether wildcard and other search operators should be disabled (treated as literals) for the input field.- Returns:
- boolean true if wildcards and search operators should be disabled, false if enabled
-
setDisableWildcardsAndOperators
public void setDisableWildcardsAndOperators(boolean disableWildcardsAndOperators) - See Also:
-
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 forMultiValueControlinstance.- Returns:
- boolean true if all option should be added, false if not
-
setAddControlSelectAllOption
public void setAddControlSelectAllOption(boolean addControlSelectAllOption) - See Also:
-
isRanged
public boolean isRanged()Indicates a field group should be created containing a from and to input field for date search ranges.When this is set to true, the input field will be replaced by a field group that is created by copying the prototype
LookupView.getRangeFieldGroupPrototype(). Within the field group, an lookup input field will be created for the from field, and this input will be used as the to date field. Between the two fields a message will be rendered that can be specified usingLookupView.getRangedToMessage()- Returns:
- boolean true if ranged field group should be created, false if not
-
setRanged
public void setRanged(boolean ranged) - See Also:
-