@FXML private void setProblem() { if (userField.getActiveValidator() != null || contest.getSelectionModel().isEmpty()) return; submission.getItems().clear(); try { problem .getItems() .addAll( api.getInfo( userField.getText(), contest.getSelectionModel().getSelectedItem().getValue())); } catch (Exception e) { getAlert(e, "投稿情報の取得に失敗しました。").show(); return; } }
@FXML private void setSubmission() { submission.getItems().addAll(problem.getSelectionModel().getSelectedItem().getValue()); }