class YourFundingController {

    @PostMapping("add-row")
    public String ajaxAddRow(Model model,
                             @PathVariable long applicationId) {
        ApplicationResource applicationResource = applicationRestService.getApplicationById(applicationId).getSuccess();
        CompetitionResource competitionResource = competitionRestService.getCompetitionById(applicationResource.getCompetition()).getSuccess();

        AbstractYourFundingPercentageForm form;
        if (competitionResource.isKtp()) {
            form = new YourPreviousFundingPercentageForm();
        } else {
            form = new YourFundingPercentageForm();
        }
        form.setOtherFundingRows(new LinkedHashMap<>());
        saver.addOtherFundingRow(form);
        Map.Entry row = (Map.Entry) form.getOtherFundingRows().entrySet().iterator().next();
        model.addAttribute("form", form);
        model.addAttribute("id", row.getKey());
        model.addAttribute("row", row.getValue());
        return "application/your-funding-fragments :: ajax_other_funding_row";
    }

}