org.springframework.richclient.form
Interface Form

All Superinterfaces:
ControlFactory
All Known Implementing Classes:
AbstractDetailForm, AbstractForm, AbstractMasterForm, AbstractReporterForm, AbstractTableMasterForm, ContactForm, GeneratedForm, LoginForm, OwnerAddressForm, OwnerGeneralForm, PetForm, StringLenghtConstraintDialog.StringLengthConstraintForm

public interface Form
extends ControlFactory

The graphical representation of the FormModel by extending ControlFactory and providing FormModel related methods. Additional methods that link with the model are:

Author:
Keith Donald

Method Summary
 void addChildForm(Form form)
          Add the given Form as a child to this Form.
 void addGuarded(Guarded guarded)
          Attach the given Guarded object with the default mask to the formModel.
 void addGuarded(Guarded guarded, int mask)
          Attach the given Guarded object with the specified mask to the formModel.
 void addValidationListener(ValidationListener listener)
          Add a ValidationListener.
 void addValidationResultsReporter(ValidationResultsReporter validationResultsReporter)
          Add a ValidationResultsReporter to this Form.
 void commit()
          Commit all values of the FormModel.
 ValidatingFormModel getFormModel()
          Returns the formModel used by the form.
 Object getFormObject()
          Convenience method to return the formObject currently used in the inner formModel.
 String getId()
          Returns the id of this form.
 List getValidationResultsReporters()
          Returns the list of ValidationResultsReporters of this Form.
 Object getValue(String formProperty)
          Convenience method to get the value of a specific property from the inner formModel.
 ValueModel getValueModel(String formProperty)
          Convenience method to get the valueModel of a specific property from the inner formModel.
 boolean hasErrors()
          Returns true if the inner FormModel has errors.
 ValidationResultsReporter newSingleLineResultsReporter(Messagable messageAreaPane)
          Create a ValidationResultsReporter for this form, sending input to the given Messagable.
 void removeChildForm(Form form)
          Remove the given Form as child from this Form.
 void removeGuarded(Guarded guarded)
          Detach the Guarded object.
 void removeValidationListener(ValidationListener listener)
          Remove a ValidationListener.
 void removeValidationResultsReporter(ValidationResultsReporter validationResultsReporter)
          Remove the given ValidationResultsReporter from this Form.
 void reset()
          Reset the FormModel.
 void revert()
          Revert the FormModel.
 void setFormObject(Object formObject)
          Convenience method to set the formObject on the inner formModel.
 
Methods inherited from interface org.springframework.richclient.factory.ControlFactory
getControl
 

Method Detail

getId

String getId()
Returns the id of this form.


getFormModel

ValidatingFormModel getFormModel()
Returns the formModel used by the form.


getFormObject

Object getFormObject()
Convenience method to return the formObject currently used in the inner formModel.


setFormObject

void setFormObject(Object formObject)
Convenience method to set the formObject on the inner formModel.


getValue

Object getValue(String formProperty)
Convenience method to get the value of a specific property from the inner formModel.


getValueModel

ValueModel getValueModel(String formProperty)
Convenience method to get the valueModel of a specific property from the inner formModel.


addValidationListener

void addValidationListener(ValidationListener listener)
Add a ValidationListener.


removeValidationListener

void removeValidationListener(ValidationListener listener)
Remove a ValidationListener.


newSingleLineResultsReporter

ValidationResultsReporter newSingleLineResultsReporter(Messagable messageAreaPane)
Create a ValidationResultsReporter for this form, sending input to the given Messagable. TODO check why it's specifically mentioning "singleLine" in the method name (can be any validationResultsReporter)

Parameters:
messageAreaPane - the message receiver used by the created resultsReporter.
Returns:
a new ResultsReporter.

addGuarded

void addGuarded(Guarded guarded)
Attach the given Guarded object with the default mask to the formModel.

See Also:
addGuarded(Guarded, int), FormGuard

addGuarded

void addGuarded(Guarded guarded,
                int mask)
Attach the given Guarded object with the specified mask to the formModel.

See Also:
FormGuard

removeGuarded

void removeGuarded(Guarded guarded)
Detach the Guarded object.


getValidationResultsReporters

List getValidationResultsReporters()
Returns the list of ValidationResultsReporters of this Form.


addValidationResultsReporter

void addValidationResultsReporter(ValidationResultsReporter validationResultsReporter)
Add a ValidationResultsReporter to this Form.


removeValidationResultsReporter

void removeValidationResultsReporter(ValidationResultsReporter validationResultsReporter)
Remove the given ValidationResultsReporter from this Form.


addChildForm

void addChildForm(Form form)
Add the given Form as a child to this Form. FormModels and other aspects of this form must behave according to the parent-child relation.


removeChildForm

void removeChildForm(Form form)
Remove the given Form as child from this Form. Parent-child relation will be removed from their FormModels and other aspects as well.


hasErrors

boolean hasErrors()
Returns true if the inner FormModel has errors.


commit

void commit()
Commit all values of the FormModel.

See Also:
FormModel.commit()

revert

void revert()
Revert the FormModel.

See Also:
FormModel.revert()

reset

void reset()
Reset the FormModel.

See Also:
FormModel.reset()


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.