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

public class LookupInputField extends InputFieldBase
Custom InputField for criteria fields within a lookup view that adds criteria specific options.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • LookupInputField

      public LookupInputField()
  • Method Details

    • performFinalize

      public void performFinalize(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 rendered

      Here final preparations can be made based on the updated view state.

      Specified by:
      performFinalize in interface LifecycleElement
      Overrides:
      performFinalize in class InputFieldBase
      Parameters:
      model - - top level object containing the data
      parent - - parent component
    • addComponentPostMetadata

      protected void addComponentPostMetadata()
      Invoked during the finalize phase to capture state of the component needs to support post operations.
      Overrides:
      addComponentPostMetadata in class InputFieldBase
    • addHiddenComponentPostMetadata

      protected void addHiddenComponentPostMetadata(Map<String,Map<String,Object>> lookupCriteriaFields)
      Add hidden search criteria components.
      Parameters:
      lookupCriteriaFields -
    • copyFromAttributeDefinition

      public void copyFromAttributeDefinition(AttributeDefinition attributeDefinition)
      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 the DataField to the corresponding properties of its AttributeDefinition retrieved 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:
      copyFromAttributeDefinition in interface DataField
      Overrides:
      copyFromAttributeDefinition in class InputFieldBase
      Parameters:
      attributeDefinition - AttributeDefinition instance the property values should be copied from
    • 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
    • filterSearchCriteria

      public Map<String,String> filterSearchCriteria(Map<String,String> searchCriteria)
      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 for MultiValueControl instance.
      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 using LookupView.getRangedToMessage()

      Returns:
      boolean true if ranged field group should be created, false if not
    • setRanged

      public void setRanged(boolean ranged)
      See Also: