I am using Vaadin 7.4 and I try to handle the situation, when a user want to close the editor when editing a row. While trying this, the method setEditorEnabled(false) throws an IllegalstateException. I did not want to handle this Exception, so I check, if isEditorActive(). When it is active, I cancel the editor.
if(getGrid().isEditorActive())
{
getGrid().cancelEditor();
}
getGrid().setEditorEnabled(editMode);
setEditButtonDescription(editMode);
getAppendButton().setVisible(editMode);
getDeleteButton().setVisible(editMode);
getResetButton().setVisible(editMode);
getSaveButton().setVisible(editMode);
My problem is, that after the cancelEditor() call, the setEditorEnabled(false) is not working. The grid is still editable.
When I does not call the cancelEditor() method, the setEditorEnabled(false) is working.
Does anyone know, where I made a mistake? Maybe there is another solution for the problem or I just have to catch the exception.
Thanks
This issue is fixed in Vaadin 8.5.1.