org.barracudamvc.core.forms
Interface FormMap
- All Superinterfaces:
- StateMap
- All Known Implementing Classes:
- DefaultFormMap, ErrorFormMap, RepopulationFormMap, XmlFormMap
public interface FormMap
- extends StateMap
A FormMap is used to provide a virtual representation of a
form. It can contain any number of unique FormElements, and
it can also be associated with FormValidators. The primary
function of a form map is to:
- define the map (with its elements and validators)
- actually populate the map (from either a ServletRequest
or a StateMap)
- validate the map (by invoking all the validators associated
with the form and all its elements)
- provide convenience methods to access the underlying values
of the form elements contained in this map
- Since:
- 1.0
- Version:
- %I%, %G%
- Author:
- Christian Cryder [christianc@granitepeaks.com], Diez B. Roggisch , Jacob Kjome
defineElement
FormElement defineElement(FormElement element)
defineElement
FormElement defineElement(String key,
FormElement element)
defineValidator
FormValidator defineValidator(FormValidator validator)
map
FormMap map(javax.servlet.ServletRequest req)
map
FormMap map(StateMap map)
mapElement
FormElement mapElement(String key,
Object origVal)
validate
FormMap validate(boolean deferExceptions)
throws ValidationException
- Throws:
ValidationException
validateElements
FormMap validateElements(boolean deferExceptions)
throws ValidationException
- Throws:
ValidationException
validateForm
FormMap validateForm(boolean deferExceptions)
throws ValidationException
- Throws:
ValidationException
exists
boolean exists(String key)
getElement
FormElement getElement(String key)
getElements
Map getElements()
setVal
void setVal(String key,
Object val)
getVal
Object getVal(String key)
getVal
Object getVal(String key,
Object dflt)
getVals
Object[] getVals(String key)
getVals
Object[] getVals(String key,
Object[] dflt)
setFormMapper
void setFormMapper(FormMapper mapper)
getFormMapper
FormMapper getFormMapper()
setLocale
void setLocale(Locale loc)
getLocale
Locale getLocale()
Copyright © 2006 BarracudaMVC.org All Rights Reserved.