@Transactional public Result remove() { // DynamicForm requestData = Form.form().bindFromRequest(); String id = requestData.get("id"); planService.remove(id); return redirect(routes.PlanApp.index()); }
@Transactional public Result register() { // Form<Plan> planForm = Form.form(Plan.class).bindFromRequest(); if (planForm.hasErrors()) { Logger.debug(planForm.errorsAsJson().toString()); return badRequest(); } Plan plan = planForm.get(); planService.register(plan); return redirect(routes.PlanApp.index()); }