[ 2653588 ] Can't select NULL for dropdown list

This commit is contained in:
Heng Sin Low 2009-03-02 05:15:30 +00:00
parent 83566cc130
commit 70fc16dd51
1 changed files with 13 additions and 1 deletions

View File

@ -285,10 +285,22 @@ ContextMenuListener, IZoomableEditor
}
else if (Events.ON_BLUR.equalsIgnoreCase(event.getName()))
{
if (getComponent().getSelectedItem() == null)
Comboitem item = getComponent().getSelectedItem();
if (item == null)
{
setValue(oldValue);
}
else
{
//on select not fire for empty label item
if (item.getLabel().equals(""))
{
Object newValue = getValue();
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
super.fireValueChange(changeEvent);
oldValue = newValue;
}
}
}
}