class FinanceChecksEligibilityController extends AsyncAdaptor {

    @PreAuthorize("hasPermission(#projectId, 'org.innovateuk.ifs.project.resource.ProjectCompositeId', 'ACCESS_FINANCE_CHECKS_SECTION')")
    @PostMapping("add-row/{rowType}")
    public String ajaxAddRow(Model model,
                             @PathVariable long projectId,
                             @PathVariable FinanceRowType rowType) throws InstantiationException, IllegalAccessException {
        YourProjectCostsForm form = new YourProjectCostsForm();
        Map.Entry<String, AbstractCostRowForm> entry = yourProjectCostsSaver.addRowForm(form, rowType);
        model.addAttribute("form", form);
        model.addAttribute("id", entry.getKey());
        model.addAttribute("row", entry.getValue());
        return String.format("application/your-project-costs-fragments :: ajax_%s_row", rowType.name().toLowerCase());
    }

}