PDA

View Full Version : why no cancelEdit in Editor.onBlur() ?



basinilya
19 Jan 2012, 11:01 PM
I have a comboBox cell editor with some predefined values. The grid is loaded from a database and the cell's value can be just any, not only those listed in the combo box.
The problem is: a user starts editing that cell and then decides not to change the value, but it changes!

from gxt 2.2.3 Editor.java


protected void onBlur(FieldEvent fe) {
if (!allowBlur && editing) {
completeEdit();
}
}

So I enabled allowBlur, but it didn't help. Now the combo box stays visible after blur.
Why not


protected void onBlur(FieldEvent fe) {
if (editing) {
if (!allowBlur) {
completeEdit();
} else {
cancelEdit();
}
}
}