Hello,
a few quick/simple q's:
One question on the two gists...
Kris' gist uses pipe.next()
of scrolling forward, Summer's comparison gist uses pipe.read(page:"next")
for the JS.
I think I do like the 'plain' read overload in JS... - but having a more explicit next() (and others) is not that bad; but (currently) my vote would be pipe.read(page:"prev".....
.
Oh... What happens when I have a regular pipe, object (where the paged
setting is NOT specified on its ctor), and I invoke pipe.read(page:"next")
?
I hope it does not issue a JS/type error :-) but I'd expect to have a straight read of ALL the "objects" (or "entities")...
You have the following:
cars.readWithFilter(filter, new Callback<Car>() {
@Override
void onSuccess(List<Car> data) {
firstPage = data;
}
@Override
void onError(Exception ex) {
//handle error
}
});
firstPage.next(.......);
I am wondering what is the fristPage
here (since the data
on the onSuccess
has been assigned to it)
I like both (JS and Android) :) The Android solution is similar to what I had in mind for iOS...
I will update the comparison gist soon !
-Matthias