Class Form.Flag

  • Enclosing class:
    Form

    public static class Form.Flag
    extends java.lang.Object
    Represents an message alert associated with a form field.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String MESSAGE_KEY  
      static java.lang.String MESSAGE_TYPE_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      Flag()
      Creates a new flag with a type of "error" and no message.
      Flag​(MessageType messageType)
      Creates a new flag with the given message type and no message.
      Flag​(MessageType messageType, java.lang.String message)
      Creates a new flag with the given type and message.
    • Constructor Detail

      • Flag

        public Flag()
        Creates a new flag with a type of "error" and no message.
      • Flag

        public Flag​(MessageType messageType)
        Creates a new flag with the given message type and no message.
        Parameters:
        messageType - The type of the flag.
      • Flag

        public Flag​(MessageType messageType,
                    java.lang.String message)
        Creates a new flag with the given type and message.
        Parameters:
        messageType - The type of the flag.
        message - The message text associated with the flag, or null for no message.
    • Method Detail

      • getMessageType

        public MessageType getMessageType()
        Returns the flag's message type.
        Returns:
        The message type of the flag.
      • setMessageType

        public void setMessageType​(MessageType messageType)
        Sets the flag's message type.
        Parameters:
        messageType - The new message type for this flag.
        Throws:
        java.lang.IllegalArgumentException - if the message type is null.
      • getMessage

        public java.lang.String getMessage()
        Returns the flag message.
        Returns:
        The message text associated with the flag, or null if there is no message.
      • setMessage

        public void setMessage​(java.lang.String message)
        Sets the flag message.
        Parameters:
        message - The message text associated with the flag, or null if there is no message.
      • decode

        public static Form.Flag decode​(java.lang.String flag)