ActionCallback (boolean restoreExpandedPaths) { var model = myTreeModel.get(); if (model == null) { // not initialized yet return ActionCallback.REJECTED; } saveExpandedPaths(); model.invalidate(null); restoreExpandedPaths(); // TODO:check return ActionCallback.DONE; }