Class FieldRefresher
java.lang.Object
fc.web.forms.FieldRefresher
Refreshes the value of a field (or fields) before the field is displayed
to the user. Refreshed values are typically retrieved from a database.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FieldRefresher
public FieldRefresher()
-
-
Method Details
-
refresh
Refresh the value of the field. The new values are request specific (and each HTTP request handler thread will update the values for that request independent of other requests). The values should be stored in the supplied form data object by invoking field methods that look like: setValue(FormData fd,....).It is possible for the specified form data to be null.
- Parameters:
fd
- the form data object, possibly null if there is no submit data.- Throws:
IOException
SQLException
-
isSubmitValid
There must be a way to figure out if the client hacked/delete/modified the form before submitting it. Since the rendered values are different per request, we cannot rely on values that the target field was constructed with. This method is conceptually similar to aDependency.isSubmitDataValid(FormData)
method. This method can be implemented to check the submitted values and return true if the submit was valid, false otherwise.The default implementation always returns true.
-
toString
-