Class DiscardValueErrorHandling
java.lang.Object
org.eclipse.nebula.widgets.nattable.edit.editor.AbstractEditErrorHandler
org.eclipse.nebula.widgets.nattable.edit.config.DiscardValueErrorHandling
- All Implemented Interfaces:
IEditErrorHandler
Strategy class for conversion/validation failures. If the entered value is
not valid, it is simply discarded. Only handles errors on commit.
- Author:
- Dirk Fauth
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.edit.editor.AbstractEditErrorHandler
underlyingErrorHandler -
Constructor Summary
ConstructorsConstructorDescriptionCreate a newDiscardValueErrorHandlingwith no underlyingIEditErrorHandlerDiscardValueErrorHandling(IEditErrorHandler underlyingErrorHandler) Create a newDiscardValueErrorHandlingusing the givenIEditErrorHandleras the underlying to allow chaining of error handling. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayError(ICellEditor cellEditor, Exception e) If an error occurs on conversion/validation of data, this method will be called for showing that error to the user.Methods inherited from class org.eclipse.nebula.widgets.nattable.edit.editor.AbstractEditErrorHandler
displayError, removeError
-
Constructor Details
-
DiscardValueErrorHandling
public DiscardValueErrorHandling()Create a newDiscardValueErrorHandlingwith no underlyingIEditErrorHandler -
DiscardValueErrorHandling
Create a newDiscardValueErrorHandlingusing the givenIEditErrorHandleras the underlying to allow chaining of error handling.- Parameters:
underlyingErrorHandler- The underlyingIEditErrorHandler
-
-
Method Details
-
displayError
If an error occurs on conversion/validation of data, this method will be called for showing that error to the user. Usually the message contained within the givenExceptionwill be shown to the user.This implementation will call its underlying
IEditErrorHandler. After the error is handled by its underlyingIEditErrorHandler, theICellEditorwill be closed, discarding the value.- Specified by:
displayErrorin interfaceIEditErrorHandler- Overrides:
displayErrorin classAbstractEditErrorHandler- Parameters:
cellEditor- TheICellEditoron which the conversion/validation error occurred. Needed to add error styling or special handling.e- TheExceptionthat contains information about the conversion/validation error. Used to show a more detailed description on the error to the user.
-