Interface FieldControlProperties
- All Known Subinterfaces:
FieldColumnControl,FieldControl
public interface FieldControlProperties
- Since:
- V4.4
-
Method Summary
Modifier and Type Method Description voidaddAriaCustomAttribute(java.lang.String name, java.lang.String value)Add an ARIA custom attribute with a specified name and value.java.lang.StringgetAriaCustomAttributes()Returns the ARIA custom attributes for the control.AriaHTMLElementIDPropertiesgetAriaDescribedBy()Returns the ARIA described-by element ID for the control.AriaHTMLElementIDPropertiesgetAriaLabelledBy()Returns the ARIA labelled-by element ID for the control.TextgetAriaLabelText()Returns theTextobject for the aria label text.java.lang.StringgetButtonImageUrl()Returns the URL of the image to be displayed when thebuttonDisplayAsImageis set totrue.TextgetButtonText()Returns theTextobject for the button text.HtmlElementPropertiesgetEditorHtmlElementProperties()Return the field editorHTMLElementPropertiesof the controlFieldHyperlinkPropertiesgetHyperlinkProperties()Hyperlink properties that apply when the field value should be displayed as a hyperlink (propertyhyperlinkis set totrue).java.lang.StringgetIvImageURL()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 (displayIvAsImageis set totrue).TextgetPlaceHolderText()Returns theTextobject for the place holder text.TextgetRequiredText()Returns the required messageTextdisplayed when the field is missing.TextgetValidationText()Returns the HTML5 validation messageText.booleanisAriaRequired()Indicates whether or not this is an aria required field.booleanisButtonDisplayAsImage()Indicates whether or not the image specified in thebuttonImageUrlproperty is displayed instead of a button.booleanisButtonSkipValidation()Returns whether or not validation of controls higher on the page is skipped prior to executing the button's on click event.booleanisDisabled()Returnstrueif the field is marked as disabled, otherwise returnsfalse.booleanisDisplayIvAsImage()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.booleanisHyperlink()Indicates whether or not the field's value should be displayed as a hyperlink.booleanisImmediateValidation()Indicates whether or not control should pass immediately to the Ebase Server when the user changes the field's value.booleanisMandatory()Deprecated.booleanisRequired()Indicates whether or not this is a required field.voidremoveAriaCustomAttribute(java.lang.String name)Remove an ARIA custom attribute specified by name.voidsetAriaCustomAttributes(java.lang.String ariaCustomAttributes)Sets the ARIA custom attributes associated with the control property and overrides the aria custom attributes value.voidsetAriaRequired(boolean ariaRequired)Sets whether or not this the aria-required attribute is set to true.voidsetButtonDisplayAsImage(boolean buttonDisplayAsImage)Sets whether or not the image specified in thebuttonImageUrlproperty is displayed instead of a button.voidsetButtonImageUrl(java.lang.String buttonImageUrl)Sets the URL of the image to be displayed when thebuttonDisplayAsImageis set totrue.voidsetButtonSkipValidation(boolean buttonSkipValidation)Specifies whether or not validation of controls higher on the page is skipped prior to executing the button's on click event.voidsetDisabled(boolean disabled)Disables the field and results in the HTML disabled attribute being added to the <input> HTML tag.voidsetDisplayIvAsImage(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.voidsetHyperlink(boolean hyperlink)Sets whether or not the field's value should be displayed as a hyperlink.voidsetImmediateValidation(boolean immediateValidation)Sets whether or not control should pass immediately to the Ebase Server when the user changes the field's value.voidsetIvImageURL(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 (propertydisplayIvAsImageis set totrue).voidsetMandatory(boolean mandatory)Deprecated.From V5.4 usesetRequired(boolean)insteadvoidsetRequired(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 useisRequired()instead -
setMandatory
@Deprecated void setMandatory(boolean mandatory)Deprecated.From V5.4 usesetRequired(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()Returnstrueif the field is marked as disabled, otherwise returnsfalse.- 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).
- 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).
- Since:
- V4.4
-
getButtonText
Text getButtonText()Returns theTextobject for the button text. This applies only to legacy (<= Ebase V3.4) button fields.- Since:
- V4.4
-
getAriaLabelText
Text getAriaLabelText()Returns theTextobject 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 {linkisRequired()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 {linkisRequired()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 theTextobject 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 thebuttonImageUrlproperty 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 thebuttonImageUrlproperty 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 thebuttonDisplayAsImageis set totrue. 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 thebuttonDisplayAsImageis set totrue. 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 (displayIvAsImageis set totrue).- 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 (propertydisplayIvAsImageis set totrue).- Since:
- V4.4
-
getHyperlinkProperties
FieldHyperlinkProperties getHyperlinkProperties()Hyperlink properties that apply when the field value should be displayed as a hyperlink (propertyhyperlinkis set totrue).- Since:
- V4.4
-
getRequiredText
Text getRequiredText()Returns the required messageTextdisplayed 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 messageText. 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 editorHTMLElementPropertiesof the control- Since:
- V5.9
-
getAriaCustomAttributes
java.lang.String getAriaCustomAttributes()Returns the ARIA custom attributes for the control.- 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.- 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.- Parameters:
name- attribute namevalue- 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.- Parameters:
name- attribute name- Since:
- V5.9
- See Also:
AriaControlProperties.getAriaCustomAttributes(),AriaControlProperties.addAriaCustomAttribute(String, String)
-
isRequired()instead