Interface FieldControlProperties

All Known Subinterfaces:
FieldColumnControl, FieldControl

public interface FieldControlProperties
Field Control Properties.
Since:
V4.4
  • Method Summary

    Modifier and Type Method Description
    void addAriaCustomAttribute​(java.lang.String name, java.lang.String value)
    Add an ARIA custom attribute with a specified name and value.
    java.lang.String getAriaCustomAttributes()
    Returns the ARIA custom attributes for the control.
    AriaHTMLElementIDProperties getAriaDescribedBy()
    Returns the ARIA described-by element ID for the control.
    AriaHTMLElementIDProperties getAriaLabelledBy()
    Returns the ARIA labelled-by element ID for the control.
    Text getAriaLabelText()
    Returns the Text object for the aria label text.
    java.lang.String getButtonImageUrl()
    Returns the URL of the image to be displayed when the buttonDisplayAsImage is set to true.
    Text getButtonText()
    Returns the Text object for the button text.
    HtmlElementProperties getEditorHtmlElementProperties()
    Return the field editor HTMLElementProperties of the control
    FieldHyperlinkProperties getHyperlinkProperties()
    Hyperlink properties that apply when the field value should be displayed as a hyperlink (property hyperlink is set to true).
    java.lang.String getIvImageURL()
    Returns the URL of the image to be displayed when Javascript is disabled and immediate validation is simulated using an image to be clicked by the user (displayIvAsImage is set to true).
    Text getPlaceHolderText()
    Returns the Text object for the place holder text.
    Text getRequiredText()
    Returns the required message Text displayed when the field is missing.
    Text getValidationText()
    Returns the HTML5 validation message Text.
    boolean isAriaRequired()
    Indicates whether or not this is an aria required field.
    boolean isButtonDisplayAsImage()
    Indicates whether or not the image specified in the buttonImageUrl property is displayed instead of a button.
    boolean isButtonSkipValidation()
    Returns whether or not validation of controls higher on the page is skipped prior to executing the button's on click event.
    boolean isDisabled()
    Returns true if the field is marked as disabled, otherwise returns false.
    boolean isDisplayIvAsImage()
    Indicates that a button is displayed as an image, and is applicable only when Javascript is disabled and immediate validation is simulated using buttons/images to be clicked by the user.
    boolean isHyperlink()
    Indicates whether or not the field's value should be displayed as a hyperlink.
    boolean isImmediateValidation()
    Indicates whether or not control should pass immediately to the Ebase Server when the user changes the field's value.
    boolean isMandatory()
    Deprecated.
    From V5.4 use isRequired() instead
    boolean isRequired()
    Indicates whether or not this is a required field.
    void removeAriaCustomAttribute​(java.lang.String name)
    Remove an ARIA custom attribute specified by name.
    void setAriaCustomAttributes​(java.lang.String ariaCustomAttributes)
    Sets the ARIA custom attributes associated with the control property and overrides the aria custom attributes value.
    void setAriaRequired​(boolean ariaRequired)
    Sets whether or not this the aria-required attribute is set to true.
    void setButtonDisplayAsImage​(boolean buttonDisplayAsImage)
    Sets whether or not the image specified in the buttonImageUrl property is displayed instead of a button.
    void setButtonImageUrl​(java.lang.String buttonImageUrl)
    Sets the URL of the image to be displayed when the buttonDisplayAsImage is set to true.
    void setButtonSkipValidation​(boolean buttonSkipValidation)
    Specifies whether or not validation of controls higher on the page is skipped prior to executing the button's on click event.
    void setDisabled​(boolean disabled)
    Disables the field and results in the HTML disabled attribute being added to the <input> HTML tag.
    void setDisplayIvAsImage​(boolean displayIvAsImage)
    Sets whether or not a button is displayed as an image, and is applicable only when Javascript is disabled and immediate validation is simulated using buttons/images to be clicked by the user.
    void setHyperlink​(boolean hyperlink)
    Sets whether or not the field's value should be displayed as a hyperlink.
    void setImmediateValidation​(boolean immediateValidation)
    Sets whether or not control should pass immediately to the Ebase Server when the user changes the field's value.
    void setIvImageURL​(java.lang.String url)
    Sets the URL of the image to be displayed when Javascript is disabled and immediate validation is simulated using an image to be clicked by the user (property displayIvAsImage is set to true).
    void setMandatory​(boolean mandatory)
    Deprecated.
    From V5.4 use setRequired(boolean) instead
    void setRequired​(boolean required)
    Sets whether or not this is a required field.
  • Method Details

    • isImmediateValidation

      boolean isImmediateValidation()
      Indicates whether or not control should pass immediately to the Ebase Server when the user changes the field's value. This is normally configured together with an on click event for the Field Control that specifies the action to perform.
      Since:
      V4.4
    • setImmediateValidation

      void setImmediateValidation​(boolean immediateValidation)
      Sets whether or not control should pass immediately to the Ebase Server when the user changes the field's value. This is normally configured together with an on click event that specifies the action to perform.
      Since:
      V4.4
    • isMandatory

      @Deprecated boolean isMandatory()
      Deprecated.
      From V5.4 use isRequired() instead
    • setMandatory

      @Deprecated void setMandatory​(boolean mandatory)
      Deprecated.
      From V5.4 use setRequired(boolean) instead
    • isRequired

      boolean isRequired()
      Indicates whether or not this is a required field. Required fields are displayed with an asterisk(*) to the right of the label text, and validation messages are issued automatically if data is not entered by the user.
      Since:
      V5.4
    • setRequired

      void setRequired​(boolean required)
      Sets whether or not this is a required field. Required fields are displayed with an asterisk(*) to the right of the label text, and validation messages are issued automatically if data is not entered by the user.
      Since:
      V5.4
    • isHyperlink

      boolean isHyperlink()
      Indicates whether or not the field's value should be displayed as a hyperlink. When the user clicks the link, control is passed to the Ebase Server and the on click event for the Field Control is executed.
      Since:
      V4.4
    • setHyperlink

      void setHyperlink​(boolean hyperlink)
      Sets whether or not the field's value should be displayed as a hyperlink. When the user clicks the link, control is passed to the Ebase Server and the on click event for the Field Control is executed.
      Since:
      V4.4
    • isDisabled

      boolean isDisabled()
      Returns true if the field is marked as disabled, otherwise returns false.
      Since:
      V5.9
      See Also:
      setDisabled(boolean)
    • setDisabled

      void setDisabled​(boolean disabled)
      Disables the field and results in the HTML disabled attribute being added to the <input> HTML tag.
      Since:
      V5.9
    • isButtonSkipValidation

      boolean isButtonSkipValidation()
      Returns whether or not validation of controls higher on the page is skipped prior to executing the button's on click event. This applies only to legacy (<= Ebase V3.4) button fields.

      Note that field type validation is always executed regardless of the setting of this flag (e.g. check that only numeric data is entered for numeric fields).

      Further documentation.

      Since:
      V4.4
    • setButtonSkipValidation

      void setButtonSkipValidation​(boolean buttonSkipValidation)
      Specifies whether or not validation of controls higher on the page is skipped prior to executing the button's on click event. This applies only to legacy (<= Ebase V3.4) button fields.

      Note that field type validation is always executed regardless of the setting of this flag (e.g. check that only numeric data is entered for numeric fields).

      Further documentation.

      Since:
      V4.4
    • getButtonText

      Text getButtonText()
      Returns the Text object for the button text. This applies only to legacy (<= Ebase V3.4) button fields.
      Since:
      V4.4
    • getAriaLabelText

      Text getAriaLabelText()
      Returns the Text object for the aria label text. This applies only to legacy (<= Ebase V3.4) button fields or when the field is displayed as a hyperlink.
      Since:
      V5.4
    • getAriaLabelledBy

      AriaHTMLElementIDProperties getAriaLabelledBy()
      Returns the ARIA labelled-by element ID for the control.
      Since:
      V5.9
    • getAriaDescribedBy

      AriaHTMLElementIDProperties getAriaDescribedBy()
      Returns the ARIA described-by element ID for the control.
      Since:
      V5.9
    • isAriaRequired

      boolean isAriaRequired()
      Indicates whether or not this is an aria required field. If {link isRequired() is set to true then aria-required='true' is implied. The aria-required attribute is not added to the input element if set to false
      Since:
      V5.9
      See Also:
      isRequired()
    • setAriaRequired

      void setAriaRequired​(boolean ariaRequired)
      Sets whether or not this the aria-required attribute is set to true. If {link isRequired() is set to true then aria-required='true' is implied. The aria-required attribute is not added to the input element if set to false
      Since:
      V5.9
      See Also:
      isRequired()
    • getPlaceHolderText

      Text getPlaceHolderText()
      Returns the Text object for the place holder text. Place holder texts are only displayed for fields with a display type of text, search, url, tel, email, and password.
      Since:
      V5.5
    • isButtonDisplayAsImage

      boolean isButtonDisplayAsImage()
      Indicates whether or not the image specified in the buttonImageUrl property is displayed instead of a button. When displayed as an image, any configured button text is displayed as alternate text. This applies only to legacy (<= Ebase V3.4) button fields.
      Since:
      V4.4
    • setButtonDisplayAsImage

      void setButtonDisplayAsImage​(boolean buttonDisplayAsImage)
      Sets whether or not the image specified in the buttonImageUrl property is displayed instead of a button. When displayed as an image, any configured button text is displayed as alternate text. This applies only to legacy (<= Ebase V3.4) button fields.
      Since:
      V4.4
    • getButtonImageUrl

      java.lang.String getButtonImageUrl()
      Returns the URL of the image to be displayed when the buttonDisplayAsImage is set to true. This applies only to legacy (<= Ebase V3.4) button fields.
      Since:
      V4.4
    • setButtonImageUrl

      void setButtonImageUrl​(java.lang.String buttonImageUrl)
      Sets the URL of the image to be displayed when the buttonDisplayAsImage is set to true. This applies only to legacy (<= Ebase V3.4) button fields.
      Since:
      V4.4
    • isDisplayIvAsImage

      boolean isDisplayIvAsImage()
      Indicates that a button is displayed as an image, and is applicable only when Javascript is disabled and immediate validation is simulated using buttons/images to be clicked by the user.
      Since:
      V4.4
    • setDisplayIvAsImage

      void setDisplayIvAsImage​(boolean displayIvAsImage)
      Sets whether or not a button is displayed as an image, and is applicable only when Javascript is disabled and immediate validation is simulated using buttons/images to be clicked by the user.
      Since:
      V4.4
    • getIvImageURL

      java.lang.String getIvImageURL()
      Returns the URL of the image to be displayed when Javascript is disabled and immediate validation is simulated using an image to be clicked by the user (displayIvAsImage is set to true).
      Since:
      V4.4
    • setIvImageURL

      void setIvImageURL​(java.lang.String url)
      Sets the URL of the image to be displayed when Javascript is disabled and immediate validation is simulated using an image to be clicked by the user (property displayIvAsImage is set to true).
      Since:
      V4.4
    • getHyperlinkProperties

      FieldHyperlinkProperties getHyperlinkProperties()
      Hyperlink properties that apply when the field value should be displayed as a hyperlink (property hyperlink is set to true).
      Since:
      V4.4
    • getRequiredText

      Text getRequiredText()
      Returns the required message Text displayed when the field is missing. This text can be used to override the default message displayed in the browser.

      To change the required message text:

       controls.Fldh0AG3.requiredText.setText("Please enter an order number");
       
      Returns:
      required text
      Since:
      V5.4
    • getValidationText

      Text getValidationText()
      Returns the HTML5 validation message Text. This text can be used to override the browser's default validation messages when HTML5 input validation is used - this applies when any of the HTML5 display types are used or when one of the HTML5 validation attributes is used e.g. min, max, pattern etc.

      It's advisable to be cautious when overriding the browser's default validation messages. The browser may have many validation messages for any given type depending on data entered by the user, whereas it is only possible to enter a single replacement message. Reasons to override the browser's default might be: to create a specific message when pattern validation is used, to create a message in a specific language etc.

      To change the validation message text:

       controls.Fldh0AG3.validationText.setText("Please enter a valid social security number");
       
      Returns:
      HTML5 type validation text
      Since:
      V5.4
    • getEditorHtmlElementProperties

      HtmlElementProperties getEditorHtmlElementProperties()
      Return the field editor HTMLElementProperties of the control
      Since:
      V5.9
    • getAriaCustomAttributes

      java.lang.String getAriaCustomAttributes()
      Returns the ARIA custom attributes for the control.

      Further documentation

      Since:
      V5.9
    • setAriaCustomAttributes

      void setAriaCustomAttributes​(java.lang.String ariaCustomAttributes)
      Sets the ARIA custom attributes associated with the control property and overrides the aria custom attributes value.

      Further documentation

      Parameters:
      ariaCustomAttributes - custom attribute value
      Since:
      V5.9
      See Also:
      AriaControlProperties.getAriaCustomAttributes()
    • addAriaCustomAttribute

      void addAriaCustomAttribute​(java.lang.String name, java.lang.String value)
      Add an ARIA custom attribute with a specified name and value.

      Further documentation

      Parameters:
      name - attribute name
      value - attribute value
      Since:
      V5.9
      See Also:
      AriaControlProperties.getAriaCustomAttributes(), AriaControlProperties.removeAriaCustomAttribute(String)
    • removeAriaCustomAttribute

      void removeAriaCustomAttribute​(java.lang.String name)
      Remove an ARIA custom attribute specified by name.

      Further documentation

      Parameters:
      name - attribute name
      Since:
      V5.9
      See Also:
      AriaControlProperties.getAriaCustomAttributes(), AriaControlProperties.addAriaCustomAttribute(String, String)