Interface TableEditorValidationHandler
-
- All Known Implementing Classes:
DefaultTableEditorValidationHandler
public interface TableEditorValidationHandler
Definition of an interface to be implemented by objects interested in validation events triggered by a column editor.
For the single columns of a table special editors or validators can be defined. If validation fails, the user should somehow be notified to get a feedback what he or she has done wrong. This is the purpose of this interface: Its single method is invoked whenever user input entered into a table gets validated (also if validation is successful). An implementation can react on validation errors in a suitable manner.
Platform-specific default implementations of this interface are available and are constructed for table components automatically. These implementations display validation errors in a message box if validation fails. Only if a different behavior is desired, custom implementations need to be created.
- Version:
- $Id: TableEditorValidationHandler.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
validationPerformed(Object table, Form editForm, TableTag tableTag, FormValidatorResults results, int row, int col)
Validation has been performed for a column editor of a table.
-
-
-
Method Detail
-
validationPerformed
boolean validationPerformed(Object table, Form editForm, TableTag tableTag, FormValidatorResults results, int row, int col)
Validation has been performed for a column editor of a table. An implementation can now react on the results of this validation. The passed in parameters provide all available information about the affected column and theForm
object used for editing. An appropriate default behavior would be to display the validation errors (if any). But an implementation is not limited to this action: It can even manipulate the entered values. To achieve this the form can be directly manipulated. Then true must be returned (which means that the form's fields should again be queried). A return value of false means that no further steps need to be performed.- Parameters:
table
- the table componenteditForm
- the editor form used for this tabletableTag
- the tag describing the affected tableresults
- the object with the validation resultsrow
- the index of the affected rowcol
- the index of the affected column- Returns:
- a flag whether the entered values should be read again from the form's fields; an implementation should return true if it has manipulated the content of the fields
-
-