[Persistence] Remove persistence usage from Edit Properties
This commit is contained in:
@@ -52,12 +52,6 @@ define(
|
|||||||
domainObject = this.domainObject,
|
domainObject = this.domainObject,
|
||||||
dialogService = this.dialogService;
|
dialogService = this.dialogService;
|
||||||
|
|
||||||
// Persist modifications to this domain object
|
|
||||||
function doPersist() {
|
|
||||||
var persistence = domainObject.getCapability('persistence');
|
|
||||||
return persistence && persistence.persist();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the domain object model based on user input
|
// Update the domain object model based on user input
|
||||||
function updateModel(userInput, dialog) {
|
function updateModel(userInput, dialog) {
|
||||||
return domainObject.useCapability('mutation', function (model) {
|
return domainObject.useCapability('mutation', function (model) {
|
||||||
@@ -77,8 +71,6 @@ define(
|
|||||||
).then(function (userInput) {
|
).then(function (userInput) {
|
||||||
// Update the model, if user input was provided
|
// Update the model, if user input was provided
|
||||||
return userInput && updateModel(userInput, dialog);
|
return userInput && updateModel(userInput, dialog);
|
||||||
}).then(function (result) {
|
|
||||||
return result && doPersist();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,9 +88,7 @@ define(
|
|||||||
creatable = type && type.hasFeature('creation');
|
creatable = type && type.hasFeature('creation');
|
||||||
|
|
||||||
// Only allow creatable types to be edited
|
// Only allow creatable types to be edited
|
||||||
return domainObject &&
|
return domainObject && creatable;
|
||||||
domainObject.hasCapability("persistence") &&
|
|
||||||
creatable;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return PropertiesAction;
|
return PropertiesAction;
|
||||||
|
|||||||
Reference in New Issue
Block a user