Created
September 28, 2014 23:06
-
-
Save amb26/16095dd2cf6f360b3ee7 to your computer and use it in GitHub Desktop.
dataSource.set using fluid.promise.follow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kettle.dataSource.set = function (that, directModel, model, options) { | |
options = kettle.dataSource.defaultiseOptions(options, directModel, true); // shared and writeable between all participants | |
var transformPromise = fluid.fireTransformEvent(that.events.onWrite, model, options); | |
var togo = fluid.promise(); | |
transformPromise.then(function (transformed) { | |
var innerPromise = thet.setImpl(options, directModel, transformed); | |
fluid.promise.follow(innerPromise, togo); | |
}); | |
kettle.dataSource.registerStandardPromiseHandlers(that, togo, options); | |
return togo; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment