Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.util
Class FormMessages

    java.lang.Object
      org.apache.turbine.util.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: FormMessages.java 1073174 2011-02-21 22:18:45Z tv $
Author:
  Neeme Praks

Constructor Summary
`FormMessages()` Constructor.

Method Summary
`FormMessage[]` | `getFormMessages(String formName)` Gets all form messages for a given form.
`FormMessage[]` | `getFormMessages(String formName, String fieldName)` Get form messages for a given form and field.
`void` | `setMessage(String formName, String fieldName, long returnCode)` Sets a message for a field of a form.
`void` | `setMessage(String formName, String fieldName, String messageName)` Sets a message for a field of a form.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FormMessages

    public FormMessages()

  Constructor.

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[].

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.