Interface InputField

All Superinterfaces:
CaseConstrainable, Cloneable, Component, Constrainable, Copyable, DataBinding, DataField, DictionaryBean, Field, Helpable, LifecycleElement, MustOccurConstrainable, Ordered, org.springframework.core.Ordered, PrerequisiteConstrainable, ScriptEventSupport, Serializable, SimpleConstrainable, UifDictionaryBean, ValidCharactersConstrainable
All Known Implementing Classes:
InputFieldBase, LookupInputField

TODO mark don't forget to fill this in.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Details

    • isInputAllowed

      boolean isInputAllowed()
      Description copied from interface: DataField
      Indicates whether the data field instance allows input, subclasses should override and set to true if input is allowed
      Specified by:
      isInputAllowed in interface DataField
      Returns:
      true if input is allowed, false if read only
      See Also:
    • getControl

      Control getControl()
      Control instance that should be used to input data for the field

      When the field is editable, the control will be rendered so the user can input a value(s). Controls typically are part of a Form and render standard HTML control elements such as text input, select, and checkbox

      Returns:
      Control instance
    • setControl

      void setControl(Control control)
      Setter for the field's control
      Parameters:
      control -
    • isInlineEdit

      boolean isInlineEdit()
      When inlineEdit is enabled, the field will appear as text, and when clicked the user will be able to edit that field's value and save that new value.

      The method that is called by inlineEdit is saveField.

      Returns:
      inlineEdit if set to true the field will have the ability to be edited inline
    • setInlineEdit

      void setInlineEdit(boolean inlineEdit)
      See Also:
    • isAjaxInlineEdit

      boolean isAjaxInlineEdit()
      When ajaxInlineEdit is enabled, the field will appear as text, and when clicked, the input version of that field is retrieved from the server; the user will be able to edit that field's value and save that new value.
      Returns:
      ajaxInlneEdit if true the field will have the ability to be edited inline via ajax call
    • setAjaxInlineEdit

      void setAjaxInlineEdit(boolean ajaxInlineEdit)
      See Also:
    • getValidationMessages

      FieldValidationMessages getValidationMessages()
      Field that contains the messages (errors) for the input field. The ValidationMessages holds configuration on associated messages along with information on rendering the messages in the user interface
      Returns:
      ValidationMessages instance
    • setValidationMessages

      void setValidationMessages(FieldValidationMessages validationMessages)
      Setter for the input field's errors field
      Parameters:
      validationMessages -
    • getOptionsFinder

      KeyValuesFinder getOptionsFinder()
      Instance of KeyValuesFinder that should be invoked to provide a List of values the field can have. Generally used to provide the options for a multi-value control or to validate the submitted field value
      Returns:
      KeyValuesFinder instance
    • setOptionsFinder

      void setOptionsFinder(KeyValuesFinder optionsFinder)
      Setter for the field's KeyValuesFinder instance
      Parameters:
      optionsFinder -
    • getOptionsFinderClass

      Class<? extends KeyValuesFinder> getOptionsFinderClass()
      Get the class of the optionsFinder being used by this InputField
      Returns:
      the class of the set optionsFinder, if not set or not applicable, returns null
    • setOptionsFinderClass

      void setOptionsFinderClass(Class<? extends KeyValuesFinder> optionsFinderClass)
      Setter that takes in the class name for the options finder and creates a new instance to use as the finder for the input field
      Parameters:
      optionsFinderClass - the options finder class to set
    • isEnableAutoDirectInquiry

      boolean isEnableAutoDirectInquiry()
      Indicates whether direct inquiries should be automatically set when a relationship for the field's property is found

      Note this only applies when the DataField.getInquiry() widget has not been configured (is null) and is set to true by default

      Returns:
      true if auto direct inquiries are enabled, false if not
    • setEnableAutoDirectInquiry

      void setEnableAutoDirectInquiry(boolean enableAutoDirectInquiry)
      Setter for enabling automatic direct inquiries
      Parameters:
      enableAutoDirectInquiry -
    • getQuickfinder

      QuickFinder getQuickfinder()
      Lookup finder widget for the field

      The quickfinder widget places a small icon next to the field that allows the user to bring up a search screen for finding valid field values. The Widget instance can be configured to point to a certain LookupView, or the framework will attempt to associate the field with a lookup based on its metadata (in particular its relationships in the model)

      Returns:
      QuickFinder lookup widget
    • setQuickfinder

      void setQuickfinder(QuickFinder quickfinder)
      Setter for the lookup widget
      Parameters:
      quickfinder - the field lookup widget to set
    • isEnableAutoQuickfinder

      boolean isEnableAutoQuickfinder()
      Indicates whether quickfinders should be automatically set when a relationship for the field's property is found

      Note this only applies when the getQuickfinder() widget has not been configured (is null) and is set to true by default

      Returns:
      true if auto quickfinders are enabled, false if not
    • setEnableAutoQuickfinder

      void setEnableAutoQuickfinder(boolean enableAutoQuickfinder)
      Setter for enabling automatic quickfinders
      Parameters:
      enableAutoQuickfinder -
    • getSuggest

      Suggest getSuggest()
      Suggest box widget for the input field

      If enabled (by render flag), as the user inputs data into the fields control a dynamic query is performed to provide the user suggestions on values which they can then select

      Note the Suggest widget is only valid when using a standard TextControl

      Returns:
      Suggest instance
    • setSuggest

      void setSuggest(Suggest suggest)
      Setter for the fields suggest widget
      Parameters:
      suggest - the field suggest widget to set
    • isWidgetInputOnly

      boolean isWidgetInputOnly()
      Indicates indicates whether the field can only be updated through a widget widgetInputOnly behaves similar to ReadOnly with the exception that the value of the input field can be changed via the associated widget (e.g. spinner, date picker, quickfinder, etc).
      Returns:
      true if only widget input is allowed, false otherwise
    • setWidgetInputOnly

      void setWidgetInputOnly(boolean widgetInputOnly)
      Setter for the widget input only indicator
      Parameters:
      widgetInputOnly -
    • isRenderInputAddonGroup

      boolean isRenderInputAddonGroup()
      Forces rendering of the input group div around the control.

      If other components add content through script that should be grouped with the control, this flag can be set to true to generate the input group, even though getPostInputAddons() may be empty

      Returns:
      boolean true to force rendering of the input group, false if not
    • setRenderInputAddonGroup

      void setRenderInputAddonGroup(boolean renderInputAddonGroup)
      See Also:
    • getPostInputCssClasses

      List<String> getPostInputCssClasses()
      List of CSS classes that will be applied to the span that wraps the post input components. TODO: revisist this, possibly getting the classes from component wrapper css classes once created
      Returns:
      List of CSS classes
    • getPostInputCssClassesAsString

      String getPostInputCssClassesAsString()
      Returns the list of post input css classes as a string formed by joining the classes with a space.
      Returns:
      post input css classes string
    • setPostInputCssClasses

      void setPostInputCssClasses(List<String> postInputCssClasses)
      See Also:
    • getPostInputAddons

      List<Component> getPostInputAddons()
      List of components that will be grouped with the input field control to form an input group.

      Generally these are icon, link, or button components that should be rendered with the control.

      See Bootstrap Input Groups

      Returns:
      List of post input components
    • setPostInputAddons

      void setPostInputAddons(List<Component> postInputAddons)
      See Also:
    • addPostInputAddon

      void addPostInputAddon(Component addOn)
      Adds a component to the list of post input addon components.
      Parameters:
      addOn - component to add
      See Also:
    • getInstructionalText

      String getInstructionalText()
      Instructional text that display an explanation of the field usage

      Text explaining how to use the field, including things like what values should be selected in certain cases and so on (instructions)

      Returns:
      instructional message
    • setInstructionalText

      void setInstructionalText(String instructionalText)
      Setter for the instructional message
      Parameters:
      instructionalText - the instructional text to set
    • getInstructionalMessage

      Message getInstructionalMessage()
      Message field that displays instructional text

      This message field can be configured to for adjusting how the instructional text will display. Generally the styleClasses property will be of most interest

      Returns:
      instructional message field
    • setInstructionalMessage

      void setInstructionalMessage(Message instructionalMessage)
      Setter for the instructional text message field

      Note this is the setter for the field that will render the instructional text. The actual text can be set on the field but can also be set using setInstructionalText(String)

      Parameters:
      instructionalMessage - the instructional message to set
    • getHelperText

      String getHelperText()
      Help text that displays under the control and is disclosed on focus.
      Returns:
      String help text for input
    • setHelperText

      void setHelperText(String helperText)
      See Also:
    • getConstraintText

      String getConstraintText()
      Text that display a restriction on the value a field can hold

      For example when the value must be a valid format (phone number, email), certain length, min/max value and so on this text can be used to indicate the constraint to the user. Generally displays with the control so it is visible when the user tabs to the field

      Returns:
      text to display for the constraint message
    • setConstraintText

      void setConstraintText(String constraintText)
      Setter for the constraint message text
      Parameters:
      constraintText - the constraint text to set
    • getConstraintMessage

      Message getConstraintMessage()
      Message field that displays constraint text

      This message field can be configured to for adjusting how the constrain text will display. Generally the styleClasses property will be of most interest

      Returns:
      constraint message field
    • setConstraintMessage

      void setConstraintMessage(Message constraintMessage)
      Setter for the constraint text message field

      Note this is the setter for the field that will render the constraint text. The actual text can be set on the field but can also be set using setConstraintText(String)

      Parameters:
      constraintMessage - the constrain message field to set
    • setValidCharactersConstraint

      void setValidCharactersConstraint(ValidCharactersConstraint validCharactersConstraint)
      Setter for validCharacterConstraint
      Parameters:
      validCharactersConstraint - the ValidCharactersConstraint to set
    • setCaseConstraint

      void setCaseConstraint(CaseConstraint caseConstraint)
      Setter for caseConstraint
      Parameters:
      caseConstraint - the CaseConstraint to set
    • getDependencyConstraints

      List<PrerequisiteConstraint> getDependencyConstraints()
      List of PrerequisiteConstraint that apply to this InputField
      Returns:
      the dependency constraints for this input field
    • setDependencyConstraints

      void setDependencyConstraints(List<PrerequisiteConstraint> dependencyConstraints)
      Setter for dependencyConstraints
      Parameters:
      dependencyConstraints - list of PrerequisiteConstraint to set
    • setMustOccurConstraints

      void setMustOccurConstraints(List<MustOccurConstraint> mustOccurConstraints)
      Setter for mustOccurConstraints
      Parameters:
      mustOccurConstraints - list of MustOccurConstraint to set
    • setSimpleConstraint

      void setSimpleConstraint(SimpleConstraint simpleConstraint)
      Setter for simple constraint

      When a simple constraint is set on this object ALL simple validation constraints set directly will be overridden - recommended to use this or the other gets/sets for defining simple constraints, not both.

      Parameters:
      simpleConstraint - the simple constraint to set
    • setDataType

      void setDataType(DataType dataType)
      This does not have to be set, represents the DataType constraint of this field. This is only checked during server side validation.
      Parameters:
      dataType - the dataType to set
    • setDataType

      void setDataType(String dataType)
    • getDataType

      DataType getDataType()
      Gets the DataType of this InputField, note that DataType set to be date when this field is using a date picker with a TextControl and has not otherwise been explicitly set.
      Returns:
      DataType
    • getMaxLength

      Integer getMaxLength()
      Maximum number of characters the input field value is allowed to have

      The maximum length determines the maximum allowable length of the value for data entry editing purposes. The maximum length is inclusive and can be smaller or longer than the actual control size. The constraint is enforced on all data types (e.g. a numeric data type needs to meet the maximum length constraint in which digits and symbols are counted).

      Returns:
      the maximum length of the input field
    • setMaxLength

      void setMaxLength(Integer maxLength)
      Setter for input field max length
      Parameters:
      maxLength - the maximum length to set
    • getMinLength

      Integer getMinLength()
      Minimum number of characters the input field value needs to be

      The minimum length determines the minimum required length of the value for data entry editing purposes. The minimum length is inclusive. The constraint is enforced on all data types (e.g. a numeric data type needs to meet the minimum length requirement in which digits and symbols are counted).

      Returns:
      the minimum length of the input field
    • setMinLength

      void setMinLength(Integer minLength)
      Setter for input field minimum length
      Parameters:
      minLength - the minLength to set
    • getRequired

      Boolean getRequired()
      Description copied from interface: Component
      Indicates whether the component is required

      At the general component level required means there is some action the user needs to take within the component. For example, within a section it might mean the fields within the section should be completed. At a field level, it means the field should be completed. This provides the ability for the renderers to indicate the required action.

      Specified by:
      getRequired in interface Component
      Returns:
      boolean true if the component is required, false if it is not required
      See Also:
    • setRequired

      void setRequired(Boolean required)
      Description copied from interface: Component
      Setter for the required indicator
      Specified by:
      setRequired in interface Component
      Parameters:
      required -
      See Also:
    • getExclusiveMin

      String getExclusiveMin()
      The exclusive minimum value for numeric or date field.

      The exclusiveMin element determines the minimum allowable value for data entry editing purposes. This constrain is supported for numeric and date fields and to be used in conjunction with the appropriate ValidCharactersConstraint. For numeric constraint the value can be an integer or decimal such as -.001 or 99.

      Returns:
      the exclusive minimum numeric value of the input field
    • setExclusiveMin

      void setExclusiveMin(String exclusiveMin)
      Setter for the field's exclusive minimum value
      Parameters:
      exclusiveMin - the minimum value to set
    • getInclusiveMax

      String getInclusiveMax()
      The inclusive maximum value for numeric or date field.

      The inclusiveMax element determines the maximum allowable value for data entry editing purposes. This constrain is supported for numeric and date fields and to be used in conjunction with the appropriate ValidCharactersConstraint. For numeric constraint the value can be an integer or decimal such as -.001 or 99.

      Returns:
      the inclusive maximum numeric value of the input field
    • setInclusiveMax

      void setInclusiveMax(String inclusiveMax)
      Setter for the field's inclusive maximum value
      Parameters:
      inclusiveMax - the maximum value to set
    • getAttributeQuery

      AttributeQuery getAttributeQuery()
      Attribute query instance configured for this field to dynamically pull information back for updates other fields or providing messages

      If field attribute query is not null, associated event script will be generated to trigger the query from the UI. This will invoke the AttributeQueryService to execute the query and return an instance of AttributeQueryResult that is then read by the script to update the UI. Typically used to update informational property values or other field values

      Returns:
      AttributeQuery instance
    • setAttributeQuery

      void setAttributeQuery(AttributeQuery attributeQuery)
      Setter for this field's attribute query
      Parameters:
      attributeQuery -
    • isUppercaseValue

      boolean isUppercaseValue()
      Perform uppercase flag for this field to force input to uppercase.

      It this flag is set to true the 'text-transform' style on the field will be set to 'uppercase' which will automatically change any text input into the field to uppercase.

      Returns:
      performUppercase flag
    • setUppercaseValue

      void setUppercaseValue(boolean uppercaseValue)
      Setter for this field's performUppercase flag
      Parameters:
      uppercaseValue - boolean flag
    • isDisableNativeAutocomplete

      boolean isDisableNativeAutocomplete()
      Indicates whether the browser autocomplete functionality should be disabled for the input field (adds autocomplete="off")

      The browser's native autocomplete functionality can cause issues with security fields and also fields with the UIF suggest widget enabled

      Returns:
      true if the native autocomplete should be turned off for the input field, false if not
    • setDisableNativeAutocomplete

      void setDisableNativeAutocomplete(boolean disableNativeAutocomplete)
      Setter to disable browser autocomplete for the input field
      Parameters:
      disableNativeAutocomplete -
    • isRenderFieldset

      boolean isRenderFieldset()
      Specified by:
      isRenderFieldset in interface DataField
    • completeValidation

      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
      Specified by:
      completeValidation in interface DataField
      Parameters:
      tracer - Record of component's location
      See Also: