org.jreform.internal
Class AbstractForm

java.lang.Object
  extended by org.jreform.internal.AbstractInputCollection
      extended by 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

Field Summary
private  Map<String,Group> groups
           
 
Constructor Summary
AbstractForm()
           
 
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jreform.InputCollection
checkbox, getCheckbox, getInput, getInputValue, getMultiCheckbox, getMultiInputValue, getMultiSelect, getRadio, getSelect, input, multiCheckbox, multiSelect, radio, select
 
Methods inherited from interface org.jreform.HttpServletRequestValidator
getErrors
 

Field Detail

groups

private final Map<String,Group> groups
Constructor Detail

AbstractForm

AbstractForm()
Method Detail

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