ca.grimoire.formtree
Interface FormAdapter

All Known Implementing Classes:
MultivaluedMapForm, ServletForm

public interface FormAdapter

Provides form data. This is intended to generalize over various form data sources: HttpServletRequest's parameter methods, Jersey's MultivaluedMap, and other similar constructs.


Method Summary
 java.lang.Iterable<java.lang.String> getFields()
          Enumerates the associated form's fields.
 java.lang.Iterable<java.lang.String> getValues(java.lang.String field)
          Returns the value of a single form field.
 

Method Detail

getFields

java.lang.Iterable<java.lang.String> getFields()
Enumerates the associated form's fields.

Returns:
a sequence of field names, in any order.

getValues

java.lang.Iterable<java.lang.String> getValues(java.lang.String field)
Returns the value of a single form field. This must only be called using field names obtained from getFields() on the same FormAdapter.

Parameters:
field - the field to retrieve.
Returns:
all values of the field in the form.


Copyright © 2011 Grimoire Alchymia. All Rights Reserved.