]> source.dussan.org Git - gwtquery.git/commit
Fix "then()" method so as it behaves like jQuery breaking the flow if previous fails...
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Sat, 9 Nov 2013 09:56:51 +0000 (10:56 +0100)
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Sat, 9 Nov 2013 09:56:51 +0000 (10:56 +0100)
commitf41e8b86ac4d1d3125f5a6247dfe0bad19dba0b7
tree8bcb6aa48edb3b2872c084889ca052e69c3017fc
parente7b915e7516b43adb90871e1657ca91c6103ad3d
Fix "then()" method so as it behaves like jQuery breaking the flow if previous fails. Add convenient method "or()" to continue the flow when we have different options to resolve an asynchronous process. Add "and()" method as an alias to "then()". "and()" and "or()" makes gQuery promises much more useful and declarative.
gwtquery-core/src/main/java/com/google/gwt/query/client/Promise.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/Deferred.java
gwtquery-core/src/test/java/com/google/gwt/query/client/deferred/DeferredTest.java