private void actionClearSkippedRecommendations(AjaxRequestTarget aTarget, Form<Void> aForm) throws IOException { learningRecordService.deleteSkippedSuggestions(getModelObject().getUser(), alStateModel.getObject().getLayer()); ActiveLearningUserState alState = alStateModel.getObject(); // The history records caused suggestions to disappear. Since visibility is only fully // recalculated when new predictions come in, we need to update the visibility explicitly // here alState.getSuggestions().stream() .flatMap(group -> group.stream()) .forEach(suggestion -> suggestion.show(FLAG_SKIPPED)); refreshSuggestions(); moveToNextRecommendation(aTarget, false); aTarget.add(mainContainer); }
private void actionClearSkippedRecommendations(AjaxRequestTarget aTarget, Form<Void> aForm) throws IOException { learningRecordService.deleteSkippedSuggestions(getModelObject().getUser(), alStateModel.getObject().getLayer()); ActiveLearningUserState alState = alStateModel.getObject(); // The history records caused suggestions to disappear. Since visibility is only fully // recalculated when new predictions come in, we need to update the visibility explicitly // here alState.getSuggestions().stream() .flatMap(group -> group.stream()) .forEach(suggestion -> suggestion.show(FLAG_SKIPPED)); refreshSuggestions(); moveToNextRecommendation(aTarget, false); aTarget.add(mainContainer); }
.forEach(suggestion -> suggestion.show(FLAG_SKIPPED | FLAG_REJECTED));
.forEach(suggestion -> suggestion.show(FLAG_SKIPPED | FLAG_REJECTED));