class YourProjectCostsController extends AsyncAdaptor {

    @PostMapping("add-row/{rowType}")
    public String ajaxAddRow(Model model,
                             @PathVariable FinanceRowType rowType) throws InstantiationException, IllegalAccessException {
        YourProjectCostsForm form = new YourProjectCostsForm();
        form.setLabour(new LabourForm());
        Map.Entry<String, AbstractCostRowForm> map = saver.addRowForm(form, rowType);

        model.addAttribute("form", form);
        model.addAttribute("id", map.getKey());
        model.addAttribute("row", map.getValue());
        return String.format("application/your-project-costs-fragments :: ajax_%s_row", rowType.name().toLowerCase());
    }

}