public class FormData
extends java.lang.Object
implements java.lang.Iterable
| Modifier and Type | Class and Description |
|---|---|
class |
FormData.FieldData
Inner class to represent the value of a field on a form
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
data |
| Constructor and Description |
|---|
FormData()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFieldData(org.springframework.extensions.webscripts.servlet.FormData.FormField field)
Adds the given webscript FormField object to the form.
|
void |
addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue)
Adds the given data to the form.
|
void |
addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue,
boolean overwrite)
Adds the given data to the form.
|
FormData.FieldData |
getFieldData(java.lang.String fieldName)
Returns the data for the given field.
|
java.util.Set |
getFieldNames()
Returns a list of the names of the fields held by this
object.
|
int |
getNumberOfFields()
Returns the number of fields data is being held for.
|
boolean |
hasFieldData(java.lang.String fieldName)
Determines whether field data for the given item exists.
|
java.util.Iterator |
iterator()
Returns an Iterator over the FieldData objects
held by this object.
|
void |
removeFieldData(java.lang.String fieldName)
Removes the data associated with the given field
if it exists.
|
java.lang.String |
toString() |
public boolean hasFieldData(java.lang.String fieldName)
fieldName - Name of field to look forpublic FormData.FieldData getFieldData(java.lang.String fieldName)
fieldName - Name of field to look forpublic void addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue)
NOTE: Adding the same named data will append the value and thereafter return a List containing all added values.
fieldName - The name of the fieldfieldValue - The value of the datapublic void addFieldData(org.springframework.extensions.webscripts.servlet.FormData.FormField field)
field - A WebScript FormField objectpublic void addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue,
boolean overwrite)
If overwrite is true the provided value replaces the existing value whereas false will force the creation of a List (if necessary) and the provided value will be added to the List.
fieldName - The name of the fieldfieldValue - The value of the dataoverwrite - public void removeFieldData(java.lang.String fieldName)
fieldName - Name of the field to removepublic java.util.Set getFieldNames()
public int getNumberOfFields()
public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.