Class Button
- java.lang.Object
-
- org.symphonyoss.symphony.messageml.elements.Element
-
- org.symphonyoss.symphony.messageml.elements.Button
-
public class Button extends Element
This class specify the Symphony Element Button represented by tag name "button". A Button can be included either inside Forms or in UIActions (at least one is required). Depending on the location, the messageML representation can be different. When is part of a Form it can contain the following attributes:- name (required) -> used to identify the button
- type -> default "action", specify the type of the button. Allowed values are "action", "reset" and "cancel"
- class -> can be "primary", "secondary", "tertiary" (deprecated: "primary-destructive","secondary-destructive")
- title -> description displayed as a hint
-
-
Field Summary
Fields Modifier and Type Field Description static StringACTION_TYPEstatic StringCANCEL_TYPEstatic StringMESSAGEML_TAGstatic StringRESET_TYPE-
Fields inherited from class org.symphonyoss.symphony.messageml.elements.Element
CLASS_ATTR, format, ID_ATTR, ID_MAX_LENGTH, MAPPER, STYLE_ATTR
-
-
Constructor Summary
Constructors Constructor Description Button(Element parent, FormatEnum format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.commonmark.node.NodeasMarkdown()voidbuildAttribute(MessageMLParser parser, Node item)voidupdateBiContext(BiContext context)voidvalidate()-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Element
addChild, areNestedElementsAllowed, asText, buildAll, buildNode, checkIntegerAttribute, countChildrenOfType, countNonTextNodesInNodeList, findElements, findElements, findElements, getAttribute, getAttributes, getChild, getChildren, getFormat, getMessageMLTag, getParent, getPresentationMLTag, getStringAttribute, hasExactNumberOfChildren, hasIdAttribute, putIntegerIfPresent, putOneIfPresent, putStringIfPresent, size, throwInvalidInputException
-
-
-
-
Field Detail
-
MESSAGEML_TAG
public static final String MESSAGEML_TAG
- See Also:
- Constant Field Values
-
ACTION_TYPE
public static final String ACTION_TYPE
- See Also:
- Constant Field Values
-
CANCEL_TYPE
public static final String CANCEL_TYPE
- See Also:
- Constant Field Values
-
RESET_TYPE
public static final String RESET_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Button
public Button(Element parent, FormatEnum format)
-
-
Method Detail
-
buildAttribute
public void buildAttribute(MessageMLParser parser, Node item) throws InvalidInputException
- Throws:
InvalidInputException
-
asMarkdown
public org.commonmark.node.Node asMarkdown()
-
validate
public void validate() throws InvalidInputException- Throws:
InvalidInputException
-
updateBiContext
public void updateBiContext(BiContext context)
-
-