|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jreform.internal.AbstractInputCollection org.jreform.internal.GroupImpl
class GroupImpl
An input group maintains its own set of inputs and errors and has its
own validation rules. The rules depend on whether the group
isRequired()
.
Field Summary | |
---|---|
private boolean |
isEmpty
|
private boolean |
isRequired
|
private String |
name
|
private AbstractForm |
parent
|
Constructor Summary | |
---|---|
GroupImpl(AbstractForm parent,
String name,
boolean isRequired)
Create a new input group. |
Method Summary | ||
---|---|---|
|
add(InputControl<T> input)
Adds the input to this input group and its parent form. |
|
private boolean |
containsInputData(javax.servlet.http.HttpServletRequest req)
|
|
String |
getName()
Returns the name of this group. |
|
boolean |
isEmpty()
Checks if this group has input data. |
|
boolean |
isRequired()
If required all inputs must satisfy imposed criteria for the group to be valid. |
|
void |
setRequired(boolean isRequired)
Set whether this group is required. |
|
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 |
---|
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.Group |
---|
isValid |
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 |
---|
private AbstractForm parent
private String name
private boolean isRequired
private boolean isEmpty
Constructor Detail |
---|
GroupImpl(AbstractForm parent, String name, boolean isRequired)
parent
- to which this group will belong.name
- of the group.isRequired
- if this group should be treated as valid when empty.Method Detail |
---|
public final <T> void add(InputControl<T> input)
add
in class AbstractInputCollection
public final String getName()
Group
public final boolean isRequired()
Group
isRequired
in interface Group
public final boolean isEmpty()
Group
true
if all inputs that belong to this group
are blank, false
otherwise.public void setRequired(boolean isRequired)
Group
setRequired
in interface Group
public final boolean validate(javax.servlet.http.HttpServletRequest req)
HttpServletRequestValidator
HttpServletRequest
.
validate
in interface HttpServletRequestValidator
final void validateInputs(javax.servlet.http.HttpServletRequest req)
private boolean containsInputData(javax.servlet.http.HttpServletRequest req)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |