Package | Description |
---|---|
fc.web.forms |
Encapsulates HTML forms as java objects (Usage Diagram [in new window], Class Hierarchy Diagram).
|
Modifier and Type | Method and Description |
---|---|
FormData |
Form.handleSubmit(javax.servlet.http.HttpServletRequest req)
Processes the submitted form.
|
FormData |
Form.handleSubmit(javax.servlet.http.HttpServletRequest req,
Connection con)
This method is similar to
Form.handleSubmit(HttpServletRequest) except
it stores the specified connection in the form data. |
FormData |
Form.refresh(javax.servlet.http.HttpServletRequest req) |
FormData |
Form.refresh(javax.servlet.http.HttpServletRequest req,
Connection con)
Refreshes the form for this request by running all attached refreshers
and dependencies.
|
Modifier and Type | Method and Description |
---|---|
void |
Form.addDynamicField(FormData fd,
Hidden f)
Adds a
Hidden field to this form. |
void |
Form.addError(FormData fd,
String errorMessage)
Convenience method that invokes
addError with an empty validation errorKey. |
void |
Field.addError(FormData fd,
String errorMessage)
Adds a field level validation error message.
|
void |
Form.addError(FormData fd,
String errorKey,
String errorMessage)
Adds a form level validation error message.
|
void |
Form.addMessage(FormData fd,
String key,
String value)
Adds an arbitrary message for this request.
|
DependentSelect |
DependentSelect.allowMultiple(FormData fd,
boolean allow)
true if multiple selections are allowed, false otherwise.
|
void |
Field.disable(FormData fd)
Disabled this field for this particular request.
|
void |
Field.enable(FormData fd)
Enables this field for this particular request.
|
boolean |
RefreshableSelect.getBooleanValue(FormData fd)
Convenience method that returns the single value of this field
as a boolean.
|
boolean |
Choice.getBooleanValue(FormData fd)
Convenience method that returns the value of this field as a boolean.
|
boolean |
Select.getBooleanValue(FormData fd)
Convenience method that returns the single value of this field
as a boolean.
|
boolean |
Hidden.getBooleanValue(FormData fd)
Convenience method that returns one value of this field as a boolean.
|
boolean |
DependentSelect.getBooleanValue(FormData fd)
Convenience method that returns the single value of this field
as a boolean.
|
boolean |
ChoiceGroup.Choice.getBooleanValue(FormData fd)
Convenience method that returns the value of this choice as a boolean.
|
boolean |
RadioGroup.getBooleanValue(FormData fd)
Convenience method that returns the value of this
field as a boolean.
|
boolean |
AbstractText.getBooleanValue(FormData fd)
Convenience method that returns the value of this field as a boolean.
|
double |
AbstractText.getDoubleValue(FormData fd)
Convenience method that returns the value of this field as a
Double.
|
Hidden |
Form.getDynamicField(FormData fd,
String fieldName)
Gets a
Hidden field added to the form data object. |
Map |
Form.getFieldErrors(FormData fd) |
float |
AbstractText.getFloatValue(FormData fd)
Convenience method that returns the value of this field as a
Float.
|
Collection |
Form.getFormErrorsCollection(FormData fd) |
List |
Form.getFormErrorsFor(FormData fd,
String formValidatorName)
Returns a list containing all form-level errors for the specified
validator.
|
int |
RefreshableSelect.getIntValue(FormData fd)
Convenience method that returns the single value of this field
as a Integer.
|
int |
Choice.getIntValue(FormData fd)
Convenience method that returns the value of this
field as a Integer.
|
int |
Select.getIntValue(FormData fd)
Convenience method that returns the single value of this field
as a Integer.
|
int |
Hidden.getIntValue(FormData fd)
Convenience method that returns one value of this field as a Integer.
|
int |
DependentSelect.getIntValue(FormData fd)
Convenience method that returns the single value of this field
as a Integer.
|
int |
RadioGroup.getIntValue(FormData fd)
Convenience method that returns the value of this
field as a integer.
|
int |
AbstractText.getIntValue(FormData fd)
Convenience method that returns the value of this
field as a Integer.
|
String |
Form.getMessage(FormData fd,
String key)
Retrieves a previously added message or null if the speccified
form data was null or if the message was not found.
|
short |
Choice.getShortValue(FormData fd)
Convenience method that returns the value of this
field as a Short.
|
short |
Hidden.getShortValue(FormData fd)
Convenience method that returns one value of this field as a Short.
|
short |
ChoiceGroup.Choice.getShortValue(FormData fd)
Convenience method that returns the value of this choice as a Short.
|
short |
AbstractText.getShortValue(FormData fd)
Convenience method that returns the value of this field as a
Short.
|
String |
RefreshableSelect.getStringValue(FormData fd)
Convenience method that returns the selected option as a
String.
|
String |
Select.getStringValue(FormData fd)
Convenience method that returns the selected option as a
String.
|
String |
Hidden.getStringValue(FormData fd)
Convenience method that returns one value of this field as a String with
null values being returned as an empty string).
|
String |
DependentSelect.getStringValue(FormData fd)
Convenience method that returns the selected option as a String.
|
String |
RadioGroup.getStringValue(FormData fd)
Convenience method that returns the selected option as a
String.
|
String |
AbstractText.getStringValue(FormData fd)
Convenience method that returns the value of this field as a String.
|
List |
Field.getValidateErrors(FormData fd)
Returns a List of Strings containing validation errors.
|
List |
RefreshableSelect.getValue(FormData fd)
Returns a List containing the selected options.
|
String |
Choice.getValue(FormData fd)
Returns the current value of this field.
|
List |
Select.getValue(FormData fd)
Returns a List containing the selected options.
|
String |
Hidden.getValue(FormData fd)
Returns a String representing the value of this field or null
if there is no current value.
|
List |
DependentSelect.getValue(FormData fd)
Returns a List containing the selected options.
|
Collection |
ChoiceGroup.getValue(FormData fd)
Returns a Collection containing the choices selected by the user.
|
String |
AbstractText.getValue(FormData fd)
Returns a string representing the value of this field or null if
there is no current value.
|
String[] |
Hidden.getValues(FormData fd)
Returns a String[] containing all values associated with this field.
|
static boolean |
Form.hasError(FormData fd)
Returns true if validation did not succeed.
|
boolean |
Field.isEnabled(FormData fd) |
boolean |
RefreshableSelect.isFilled(FormData fd)
Returns true if some option has been selected
by the user, false otherwise.
|
boolean |
Choice.isFilled(FormData fd) |
boolean |
Select.isFilled(FormData fd)
Returns true if some option has been selected
by the user, false otherwise.
|
boolean |
Hidden.isFilled(FormData fd) |
abstract boolean |
Field.isFilled(FormData fd)
Returns true if this field was isFilled out or selected by the
user, false otherwise.
|
boolean |
DependentSelect.isFilled(FormData fd)
Returns true if some option has been selected by the user,
false otherwise.
|
boolean |
ChoiceGroup.isFilled(FormData fd)
Returns true if some option has been selected by the user,
false otherwise.
|
boolean |
AbstractText.isFilled(FormData fd) |
boolean |
ChoiceGroup.isSelected(FormData fd,
ChoiceGroup.Choice choice,
boolean default_val)
Returns true is the specified choice was selected by the user
(the user's submission is provided by the formdata argument).
|
boolean |
TestDependency.isSubmitDataValid(FormData fd) |
boolean |
Dependency.isSubmitDataValid(FormData fd)
Returns true if the submitted values are in a valid range of values.
|
boolean |
FieldRefresher.isSubmitValid(FormData fd)
There must be a way to figure out if the client hacked/delete/modified the
form before submitting it.
|
boolean |
VFilledOnFilled.postConditionMet(FormData fd,
javax.servlet.http.HttpServletRequest req) |
abstract boolean |
VConditional.postConditionMet(FormData fd,
javax.servlet.http.HttpServletRequest req)
Subclasses should implement this method to check that
certain post conditions have been met.
|
boolean |
VFilledOnChoice.postConditionMet(FormData fd,
javax.servlet.http.HttpServletRequest req) |
boolean |
VFilledOnFilled.preConditionMet(FormData fd,
javax.servlet.http.HttpServletRequest req) |
abstract boolean |
VConditional.preConditionMet(FormData fd,
javax.servlet.http.HttpServletRequest req)
Subclasses should implement this method to check that certain fields or
pre-conditions have been met.
|
boolean |
VFilledOnChoice.preConditionMet(FormData fd,
javax.servlet.http.HttpServletRequest req) |
abstract void |
FieldRefresher.refresh(FormData fd)
Refresh the value of the field.
|
void |
Field.render(FormData fd,
Writer writer)
This method writes the HTML for this form field to the given writer.
|
void |
ChoiceGroup.Choice.render(FormData fd,
Writer writer,
boolean disabled)
Renders this choice maintaining it's selected state by using the
specified form data.
|
void |
Field.render(FormData fd,
Writer writer,
String prefix,
String suffix)
Similar to
Field.render(Writer) but also renders the specified
prefix/suffix strings before and after each element. |
void |
TestDependency.renderDependencyData(FormData fd,
Writer out) |
void |
Dependency.renderDependencyData(FormData fd,
Writer writer)
Writes out data to keep track of dependency state.
|
void |
Form.renderDynamicFields(FormData fd,
Writer out)
Renders all dynamically added hidden fields of the form.
|
void |
Form.renderError(FormData fd,
Writer writer)
Convenience method to render form-level validation errors.
|
Field |
Field.renderError(FormData fd,
Writer writer)
Calls
renderError(Writer, String) with <br> as
the message seperator string. |
Field |
Field.renderError(FormData fd,
Writer writer,
String htmlSep)
Convenience method to render validation errors.
|
void |
Form.renderErrorFor(FormData fd,
Writer writer,
String formValidatorName)
Convenience method to render a validation error for a particluar form level
validator.
|
void |
Text.renderImpl(FormData fd,
Writer writer) |
void |
RefreshableSelect.renderImpl(FormData fd,
Writer writer) |
void |
Choice.renderImpl(FormData fd,
Writer writer) |
void |
Password.renderImpl(FormData fd,
Writer writer) |
void |
Select.renderImpl(FormData fd,
Writer writer) |
void |
Hidden.renderImpl(FormData fd,
Writer writer) |
abstract void |
Field.renderImpl(FormData fd,
Writer writer) |
void |
DependentSelect.renderImpl(FormData fd,
Writer writer) |
void |
ChoiceGroup.renderImpl(FormData fd,
Writer writer)
Renders all elements of this group one after onether, seperated by a
whitespace.
|
void |
TextArea.renderImpl(FormData fd,
Writer writer) |
void |
ChoiceGroup.renderImpl(FormData fd,
Writer writer,
String prefix,
String suffix)
Renders the elements of this form by prefixing and suffixing each element
with the specified arguments.
|
void |
Hidden.reset(FormData fd) |
void |
AbstractText.reset(FormData fd) |
void |
TestDependency.setDependencyDataFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req) |
void |
Dependency.setDependencyDataFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req)
The inverse of
renderDependencyData , sets any depedency data submitted
as part of the form. |
void |
RefreshableSelect.setSelectedValue(FormData fd,
int value)
Convenience method that invokes
#setSelectedValue(fd, String)
after converting the specified integer value to a string. |
void |
RefreshableSelect.setSelectedValue(FormData fd,
String value)
Convenience method that sets the options for this select in the
specified form data.
|
DependentSelect |
DependentSelect.setSize(FormData fd,
int size)
This value (if set) is rendered as the html SIZE tag.
|
void |
Choice.setValue(FormData fd,
boolean selected)
Convenience method that sets this choice to be selected/non-selected.
|
void |
ChoiceGroup.setValue(FormData fd,
Collection values)
Sets the selected values for this choicegroup in the specified form data.
|
void |
RefreshableSelect.setValue(FormData fd,
List values)
Sets the options for this select in the specified form data.
|
void |
DependentSelect.setValue(FormData fd,
List values)
Sets the selected values for this select in the specified form data.
|
void |
Choice.setValue(FormData fd,
String value)
Sets the selected or non-selected state for this choice in the
specified form data.
|
void |
AbstractText.setValue(FormData fd,
String value)
Sets the selected values for this select in the specified form data.
|
void |
RefreshableSelect.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req) |
void |
Choice.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req) |
void |
Select.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req) |
void |
Hidden.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req) |
abstract void |
Field.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req)
This method sets the value of this field from the parameters obtained from
the specified request.
|
void |
DependentSelect.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req) |
void |
ChoiceGroup.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req) |
void |
AbstractText.setValueFromSubmit(FormData fd,
javax.servlet.http.HttpServletRequest req)
Sets the value of the field from the submitted form data.
|
void |
TestDependency.updateValues(FormData fd,
javax.servlet.http.HttpServletRequest req) |
void |
Dependency.updateValues(FormData fd,
javax.servlet.http.HttpServletRequest req)
Sets new values for target field in the FormData object.
|
boolean |
VConditional.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Returns the value returned by
VConditional.postConditionMet(fc.web.forms.FormData, javax.servlet.http.HttpServletRequest)
if the pre conditions were met. |
abstract boolean |
FieldValidator.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Validates the field in some fashion.
|
boolean |
VPasswordGroup.validate(FormData fd,
javax.servlet.http.HttpServletRequest req) |
boolean |
VFilledGroup.validate(FormData fd,
javax.servlet.http.HttpServletRequest req) |
boolean |
VSelectValue.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Works with the
Select field. |
boolean |
VText.validate(FormData fd,
javax.servlet.http.HttpServletRequest req) |
boolean |
VEmail.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Works with any field that returns a String via it's
Field#getValue method. |
boolean |
Field.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Validates this field via the installed validators.
|
boolean |
VDate.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Works with any field that returns a String via it's
Field#getValue method. |
abstract boolean |
FormValidator.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Validates multiple fields together.
|
boolean |
VFilled.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Validates a field's value to be isFilled.
|
boolean |
VTime.validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Works with any field that returns a String via it's
Field#getValue method. |
boolean |
VSameText.validate(FormData fd,
javax.servlet.http.HttpServletRequest req) |