org.jreform.internal
Class AbstractForm
java.lang.Object
org.jreform.internal.AbstractInputCollection
org.jreform.internal.AbstractForm
- All Implemented Interfaces:
- Form, HttpServletRequestValidator, InputCollection
- Direct Known Subclasses:
- BaseHtmlForm
class AbstractForm
- extends AbstractInputCollection
- implements Form
A form that contains a set of its own inputs, errors and input groups.
It also contains references to inputs of its child groups.
Input names and input group names must be unique within a form.
- Author:
- armandino (at) gmail.com
Method Summary |
(package private) void |
addGroup(Group group)
Adds the passed in group to the form. |
Group |
getGroup(String name)
Returns a group with the specified name. |
boolean |
validate(javax.servlet.http.HttpServletRequest req)
Validates the passed in HttpServletRequest . |
(package private) void |
validateInputs(javax.servlet.http.HttpServletRequest req)
|
Methods inherited from class org.jreform.internal.AbstractInputCollection |
add, addError, additionalValidate, checkbox, getCheckbox, getErrors, getInput, getInputControl, getInputs, getInputValue, getMultiCheckbox, getMultiInputValue, getMultiSelect, getRadio, getSelect, input, isValid, multiCheckbox, multiSelect, radio, select, setValid, toString |
Methods inherited from interface org.jreform.InputCollection |
checkbox, getCheckbox, getInput, getInputValue, getMultiCheckbox, getMultiInputValue, getMultiSelect, getRadio, getSelect, input, multiCheckbox, multiSelect, radio, select |
groups
private final Map<String,Group> groups
AbstractForm
AbstractForm()
addGroup
final void addGroup(Group group)
- Adds the passed in group to the form.
- Throws:
DuplicateNameException
- if there is an existing group
with the same name.
getGroup
public final Group getGroup(String name)
- Description copied from interface:
Form
- Returns a group with the specified name.
- Specified by:
getGroup
in interface Form
validate
public final boolean validate(javax.servlet.http.HttpServletRequest req)
- Description copied from interface:
HttpServletRequestValidator
- Validates the passed in
HttpServletRequest
.
- Specified by:
validate
in interface HttpServletRequestValidator
validateInputs
final void validateInputs(javax.servlet.http.HttpServletRequest req)
Copyright © 2007-2008
jReform