TextInputField that can validate and decorate itself. By default it uses a {@link TextFieldIconDecorator} to decorate itself. A different decorator can be assigned bycalling {@link #setDecorator(InputFieldDecorator) setDecorator}.
By default a TextInputField2 will update its state dynamically as it is being modified. If this behavior is not wanted it can be turned off by calling the {@link #setDecorateDynamically(boolean)} with the argument false.
This is an abstract class; a deriving class must implement the method {@link #isInputValid(String)} which should return true if the suppliedString is valid. A subclass should in most cases also override the method {@link #getInvalidMessage(String)} which should return a suitable error message. This messagewill be used in the InputFieldException that is thrown from the validateField method if the current value is invalid. The default implementation of getInvalidMessage returns the string "Invalid value.".
TextInputField2 implements the {@link org.jitterbit.ui.input.InputFieldValidator InputFieldValidator} and {@link org.jitterbit.ui.input.InputFieldDecorator InputFieldDecorator}interfaces, but a TextInputField2 instance can only validate and decorate itself. An attempt to validate or decorate another InputField will result in an IllegalArgumentException being thrown.
@author Torgil Zethson