Source:
public void onSaveInternal() { DataCenterModel model = (DataCenterModel) getWindow(); if (model.getProgress() != null) { return; } StoragePool dataCenter = model.getIsNew() ? new StoragePool() : (StoragePool) Cloner.clone(getSelectedItem()); cancelConfirmation(); dataCenter.setName(model.getName().getEntity()); dataCenter.setdescription(model.getDescription().getEntity()); dataCenter.setComment(model.getComment().getEntity()); dataCenter.setIsLocal(model.getStoragePoolType().getSelectedItem()); dataCenter.setcompatibility_version(model.getVersion().getSelectedItem()); dataCenter.setQuotaEnforcementType(model.getQuotaEnforceTypeListModel() .getSelectedItem()); model.startProgress(null); if (model.getIsNew()) { Frontend.getInstance().runAction(VdcActionType.AddEmptyStoragePool, new StoragePoolManagementParameter(dataCenter), new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { DataCenterListModel localModel = (DataCenterListModel) result.getState(); localModel.postOnSaveInternal(result.getReturnValue()); } }, this); } else { SystemTreeItemModel itemModel = CommonModel.getInstance().getSystemTree().getItemById(dataCenter.getId()); StoragePool storagePool = (StoragePool) itemModel.getEntity(); storagePool.setQuotaEnforcementType(dataCenter.getQuotaEnforcementType()); Frontend.getInstance().runMultipleAction(VdcActionType.UpdateStoragePool, new ArrayList<VdcActionParametersBase>(Arrays.asList( new StoragePoolManagementParameter(dataCenter)) ), new IFrontendMultipleActionAsyncCallback() { @Override public void executed(FrontendMultipleActionAsyncResult result) { DataCenterListModel localModel = (DataCenterListModel) result.getState(); localModel.postOnSaveInternal(result.getReturnValue().get(0)); } }, this); } }

Target:
public void onSaveInternal() { DataCenterModel model = (DataCenterModel) getWindow(); if (model.getProgress() != null) { return; } StoragePool dataCenter = model.getIsNew() ? new StoragePool() : (StoragePool) Cloner.clone(getSelectedItem()); cancelConfirmation(); dataCenter.setName(model.getName().getEntity()); dataCenter.setdescription(model.getDescription().getEntity()); dataCenter.setComment(model.getComment().getEntity()); dataCenter.setIsLocal(model.getStoragePoolType().getSelectedItem()); dataCenter.setcompatibility_version(model.getVersion().getSelectedItem()); dataCenter.setQuotaEnforcementType(model.getQuotaEnforceTypeListModel() .getSelectedItem()); model.startProgress(null); if (model.getIsNew()) { Frontend.getInstance().runAction(VdcActionType.AddEmptyStoragePool, new StoragePoolManagementParameter(dataCenter), new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { DataCenterListModel localModel = (DataCenterListModel) result.getState(); localModel.postOnSaveInternal(result.getReturnValue()); } }, this); } else { SystemTreeItemModel itemModel = CommonModel.getInstance().getSystemTree().getItemById(dataCenter.getId()); itemModel.setEntity(dataCenter); Frontend.getInstance().runMultipleAction(VdcActionType.UpdateStoragePool, new ArrayList<VdcActionParametersBase>(Arrays.asList( new StoragePoolManagementParameter(dataCenter)) ), new IFrontendMultipleActionAsyncCallback() { @Override public void executed(FrontendMultipleActionAsyncResult result) { DataCenterListModel localModel = (DataCenterListModel) result.getState(); localModel.postOnSaveInternal(result.getReturnValue().get(0)); } }, this); } }