Class FormElement
-
- All Implemented Interfaces:
public abstract class FormElement
A visible form control. Every form element has a single parent FormField. Each form element is associated with a single WidgetAnnotation that is a visual representation of the form element in the document.
-
-
Field Summary
Fields Modifier and Type Field Description public final FormField
formField
public FormElement
previousElement
public FormElement
nextElement
-
Method Summary
Modifier and Type Method Description FormField
getFormField()
Retrieve parent form field. FormElement
getPreviousElement()
Returns previous form element in tab order. void
setPreviousElement(@Nullable() FormElement prevElement)
Sets previous element in form tab order, may be null
.FormElement
getNextElement()
Returns next form element in tab order. void
setNextElement(@Nullable() FormElement nextElement)
Sets next element in form tab order, may be null
.WidgetAnnotation
getAnnotation()
Retrieve widget annotation for this form element. abstract FormType
getType()
Returns type of the form field. String
getFullyQualifiedName()
Returns the fully qualified name for the form element. String
getName()
Returns the name for the form element. boolean
isReadOnly()
If set, the user may not change the value of this form field. boolean
isRequired()
If set, the field shall have a value at the time it is exported by a submit-form action. boolean
equals(Object o)
int
hashCode()
-
-
Method Detail
-
getFormField
@NonNull() FormField getFormField()
Retrieve parent form field.
- Returns:
Attached parent form field.
-
getPreviousElement
@Nullable() FormElement getPreviousElement()
Returns previous form element in tab order.
- Returns:
Previous form element in tab order or
null
if this element is the first element in tab order.
-
setPreviousElement
void setPreviousElement(@Nullable() FormElement prevElement)
Sets previous element in form tab order, may be
null
.- Parameters:
prevElement
- previous element in form tab order.
-
getNextElement
@Nullable() FormElement getNextElement()
Returns next form element in tab order.
- Returns:
Next form element in tab order or
null
if this element is the last element in tab order.
-
setNextElement
void setNextElement(@Nullable() FormElement nextElement)
Sets next element in form tab order, may be
null
.- Parameters:
nextElement
- next element in form tab order.
-
getAnnotation
@NonNull() WidgetAnnotation getAnnotation()
Retrieve widget annotation for this form element.
- Returns:
Widget annotation that is a visual representation of this form element.
-
getType
@NonNull() abstract FormType getType()
Returns type of the form field.
- Returns:
The type of the parent form field.
-
getFullyQualifiedName
@NonNull() String getFullyQualifiedName()
Returns the fully qualified name for the form element.
- Returns:
Returns fully qualified name for the form element including the parents names separated by `.`
-
getName
@NonNull() String getName()
Returns the name for the form element.
- Returns:
Returns name for form element.
-
isReadOnly
boolean isReadOnly()
If set, the user may not change the value of this form field. This flag is useful for fields whose values are computed or imported from a database.
- Returns:
true
when field is read-only.
-
isRequired
boolean isRequired()
If set, the field shall have a value at the time it is exported by a submit-form action.
- Returns:
true
when field is required.
-
hashCode
int hashCode()
-
-
-
-