public static Result newTask() { Form<Task> filledForm = taskForm.bindFromRequest(); if (filledForm.hasErrors()) { return badRequest(views.html.index.render(Task.all(), filledForm)); } else { Task.create(filledForm.get()); return redirect(routes.Application.tasks()); } }
public Result add(Integer project, String folder, @Bind("title") String title) { task = Task.create(project, folder, title); editable = true; return ok(Item.class); }