Package 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$
- Author:
- Neeme Praks
-
-
Constructor Summary
Constructors Constructor Description FormMessages()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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[].
-
-