public class TextField extends FormElement implements RegexElement, LabelableElement, TooltipableElement, MinMaxLengthElement
| Modifier and Type | Field and Description |
|---|---|
static String |
ELEMENT_ID |
static String |
MESSAGEML_TAG |
static String |
PRESENTATIONML_INPUT_TYPE |
INPUT_TAG, NAME_ATTR, TYPE_ATTRCLASS_ATTR, format, ID_ATTR, STYLE_ATTRALL_REGEX_ATTRS, ATTRIBUTE_MANDATORY_WHEN_ATTRIBUTE_DEFINED_ERR, ATTRIBUTE_TOO_LONG_ERR, PATTERN_ATTR, PATTERN_ERROR_MESSAGE_ATTR, PATTERN_ERROR_MESSAGE_MAX_LENGTH, PATTERN_MAX_LENGTH, PRESENTATIONML_PATTERN_ERROR_MESSAGE_ATTR, REGEX_NOT_VALID_ERRLABEL, LABEL_FOR, LABEL_MAX_LENGTH, LABEL_TOO_LONG_ERRDATA_TARGET_ID, DATA_TITLE, TITLE, TOOLTIP_CLASS, TOOLTIP_MAX_LENGTH, TOOLTIP_TOO_LONG_ERR, TOOLTIPABLE_PRESENTATIONMLPRESENTATIONML_DIV_FLAGALL_MIN_MAX_ATTRS, MAXLENGTH_ATTR, MINLENGTH_ATTR| Constructor and Description |
|---|
TextField(Element parent,
FormatEnum messageFormat) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areNestedElementsAllowed()
Return true if nested elements are allowed
By default true, override to false for elements that dont support nested elements
|
org.commonmark.node.Node |
asMarkdown()
Return Markdown representation of the element as
Node. |
void |
buildAll(MessageMLParser parser,
Element element)
Process a DOM element, descending into its children, and construct the output MessageML tree.
|
protected void |
buildAttribute(MessageMLParser parser,
Node item)
Parse a DOM attribute into MessageML element properties.
|
String |
getAttributeValue(String attributeName) |
String |
getElementId() |
String |
getElementInitialValue() |
String |
getElementType() |
Integer |
getMaxValueAllowed() |
Integer |
getMinValueAllowed() |
Map<String,String> |
getOtherAttributes() |
String |
getPresentationMLTag()
Return the element's PresentationML tag.
|
boolean |
hasElementInitialValue() |
void |
validate()
Check the syntax and contents of the element.
|
addChild, asText, buildNode, countNonTextNodesInNodeList, findElements, findElements, findElements, getAttribute, getAttributes, getChild, getChildren, getFormat, getMessageMLTag, getParent, getStringAttribute, hasExactNumberOfChildren, hasIdAttribute, size, throwInvalidInputExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttribute, getAttributes, getFormat, getRegexAttrForPresentationML, validateRegexgetLabelAttribute, getPresentationMLLabelTag, isLabel, isLabelNode, validateLabelgetPresentationMLTooltipTag, getTooltipAttributes, isTooltip, isTooltipNode, validateTooltipfillAttributes, fillAttributes, getAttribute, getAttributes, getStringAttribute, isSplittable, isSplittableNodeComponent, splittableAsPresentationML, splittableRemove, validateSplittablegetAttributeAsInteger, getDefaultValueIfCurrentIsNull, getLengthErrorMessage, isLengthOutOfRange, isMinAndMaxLengthCombinationValid, isTextBiggerThanMaxLength, isTextSmallerThanMinLength, validateInitialValueIfFound, validateMinAndMaxLengthspublic static final String MESSAGEML_TAG
public static final String ELEMENT_ID
public static final String PRESENTATIONML_INPUT_TYPE
public TextField(Element parent, FormatEnum messageFormat)
public void validate()
throws InvalidInputException
Elementvalidate in class FormElementInvalidInputExceptionpublic void buildAll(MessageMLParser parser, Element element) throws InvalidInputException, ProcessingException
ElementbuildAll in class ElementInvalidInputExceptionProcessingExceptionpublic org.commonmark.node.Node asMarkdown()
ElementNode.protected void buildAttribute(MessageMLParser parser, Node item) throws InvalidInputException
ElementInvalidInputExceptionpublic Map<String,String> getOtherAttributes()
getOtherAttributes in interface RegexElementpublic String getPresentationMLTag()
ElementgetPresentationMLTag in class Elementpublic boolean areNestedElementsAllowed()
ElementareNestedElementsAllowed in class Elementpublic String getElementId()
getElementId in interface SplittableElementpublic String getElementType()
getElementType in interface MinMaxLengthElementpublic boolean hasElementInitialValue()
hasElementInitialValue in interface MinMaxLengthElementpublic String getElementInitialValue()
getElementInitialValue in interface MinMaxLengthElementpublic String getAttributeValue(String attributeName)
getAttributeValue in interface MinMaxLengthElementattributeName - we want to retrievepublic Integer getMinValueAllowed()
getMinValueAllowed in interface MinMaxLengthElementpublic Integer getMaxValueAllowed()
getMaxValueAllowed in interface MinMaxLengthElementCopyright © 2020 The Symphony Software Foundation. All rights reserved.