if (focusField instanceof BasicEditField && !focusField.isDirty()) {
if (key >= Characters.DIGIT_ZERO && key <= Characters.DIGIT_NINE
|| key == Characters.BACKSPACE
|| key == Characters.HYPHEN_MINUS) {
final BasicEditField bef = (BasicEditField) focusField;
bef.clear(10);
if (key != Characters.BACKSPACE) {
bef.setText(key + "");
}