fc.web.forms
Class FormData

java.lang.Object
  extended by fc.web.forms.FormData

public final class FormData
extends Object

An object that contains form data submitted by a user. This object represents the data submitted by a browser upon each time the form is submitted. This object can then be passed along to various other methods in the form framework as needed. This object can also be created manually before the form is shown if default/initial values must differ per user (say, when user must initially see their last filled value which is retreived from a database).

See Also:
Form#handleSubmit handleSubmit}.

Constructor Summary
FormData()
           
FormData(Log log)
           
 
Method Summary
 void addDynamicField(Hidden hidden)
          Adds a Hidden field to this form.
 Connection getConnection()
           
 Hidden getDynamicField(String fieldName)
          Gets a Hidden field added to this formdata object.
 Object getValidatedData(String fieldname)
           
 void putValidatedData(String fieldname, Object obj)
          Useful if strings entered by the user in the browser form are converted to dates/times etc as part of the validation.
 void setConnection(Connection con)
          Sets a connection to be used during this request.
 void setDependencyUpdated()
          Dependencies should call this method to set the dependencyUpdated flag to true anytime there is a dependency change.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormData

public FormData(Log log)

FormData

public FormData()
Method Detail

putValidatedData

public void putValidatedData(String fieldname,
                             Object obj)
Useful if strings entered by the user in the browser form are converted to dates/times etc as part of the validation. Validators can then put those date/time/whatever objects here and then those same conversions don't have to be repeated at a later stage while saving the form out to a database.


getValidatedData

public Object getValidatedData(String fieldname)

setConnection

public void setConnection(Connection con)
Sets a connection to be used during this request. Meant primarily for refresher/dependent fields.


getConnection

public Connection getConnection()

addDynamicField

public void addDynamicField(Hidden hidden)
Adds a Hidden field to this form. This field exists only for the duration of this form data object. This field can be rendered.


getDynamicField

public Hidden getDynamicField(String fieldName)
Gets a Hidden field added to this formdata object. Returns null if that field does not exist.


setDependencyUpdated

public void setDependencyUpdated()
Dependencies should call this method to set the dependencyUpdated flag to true anytime there is a dependency change.


toString

public String toString()
Overrides:
toString in class Object