org.barracudamvc.core.forms
Interface FormMap
- All Superinterfaces:
- StateMap
- All Known Implementing Classes:
- DefaultFormMap
- 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
public FormElement defineElement(FormElement element)
defineElement
public FormElement defineElement(String key,
FormElement element)
defineValidator
public FormValidator defineValidator(FormValidator validator)
map
public FormMap map(javax.servlet.ServletRequest req)
map
public FormMap map(StateMap map)
mapElement
public FormElement mapElement(String key,
Object origVal)
validate
public FormMap validate(boolean deferExceptions)
throws ValidationException
- Throws:
ValidationException
validateElements
public FormMap validateElements(boolean deferExceptions)
throws ValidationException
- Throws:
ValidationException
validateForm
public FormMap validateForm(boolean deferExceptions)
throws ValidationException
- Throws:
ValidationException
exists
public boolean exists(String key)
getElement
public FormElement getElement(String key)
getElements
public Map getElements()
setVal
public void setVal(String key,
Object val)
getVal
public Object getVal(String key)
getVal
public Object getVal(String key,
Object dflt)
getVals
public Object[] getVals(String key)
getVals
public Object[] getVals(String key,
Object[] dflt)
setFormMapper
public void setFormMapper(FormMapper mapper)
getFormMapper
public FormMapper getFormMapper()
setLocale
public void setLocale(Locale loc)
getLocale
public Locale getLocale()
Copyright © 2004 BarracudaMVC.org All Rights Reserved.