use of edu.stanford.bmir.protege.web.shared.collection.GetCollectionItemsAction in project webprotege by protegeproject.
the class CollectionItemListPresenter method refresh.
public void refresh(Runnable runnable) {
Place place = placeController.getWhere();
if (!(place instanceof CollectionViewPlace)) {
return;
}
CollectionViewPlace collectionViewPlace = (CollectionViewPlace) place;
dispatchServiceManager.execute(new GetCollectionItemsAction(collectionViewPlace.getProjectId(), collectionViewPlace.getCollectionId(), PageRequest.requestPage(view.getPageNumber())), busy -> {
}, result -> {
Page<CollectionItem> page = result.getElementIdPage();
view.setPageCount(page.getPageCount());
view.setPageNumber(page.getPageNumber());
view.setElements(page.getPageElements());
collectionViewPlace.getSelection().ifPresent(view::setSelection);
runnable.run();
});
}
Aggregations