Class FormMessages


  • public class FormMessages
    extends Object
    Used for adding and accessing messages that relate to a specific form and field. Allows to query for messages by form name and field name. Used together with FormMessage class.
    Version:
    $Id$
    Author:
    Neeme Praks
    • Method Detail

      • setMessage

        public void setMessage​(String formName,
                               String fieldName,
                               long returnCode)
        Sets a message for a field of a form. The message is given as a long representing a return code.
        Parameters:
        formName - A String with the form name.
        fieldName - A String with the field name.
        returnCode - A long with the return code.
      • setMessage

        public void setMessage​(String formName,
                               String fieldName,
                               String messageName)
        Sets a message for a field of a form. The message is given as a String.
        Parameters:
        formName - A String with the form name.
        fieldName - A String with the field name.
        messageName - A String with the message.
      • getFormMessages

        public FormMessage[] getFormMessages​(String formName)
        Gets all form messages for a given form.
        Parameters:
        formName - A String with the form name.
        Returns:
        A FormMessage[].
      • getFormMessages

        public FormMessage[] getFormMessages​(String formName,
                                             String fieldName)
        Get form messages for a given form and field.
        Parameters:
        formName - A String with the form name.
        fieldName - A String with the field name.
        Returns:
        A FormMessage[].