Item originalItem = (Item) oee.original;
Item modifiedItem = (Item) oee.getObject();
// We fire an ask event to determine if this item is currently beeing edited
// If so, we will ignore this save request, it will be handled by the editor that edits the item.
AskEvent ae = new AskEvent(itemBrowser, "global.edit.geteditedinstance", originalItem);
itemBrowser.fireEvent(ae);
Item editedItem = (Item) ae.getAnswer();
if (editedItem != null)
// We will use the edited item instead of the current one as node provider (may be newer!)
return EVENT_IGNORED;
oee.saved = updateItem(originalItem, modifiedItem);