示例#1
0
 public static Result newTask() {
   Form<Task> filledForm = taskForm.bindFromRequest();
   if (filledForm.hasErrors()) return badRequest(views.html.task.render(Task.all(), filledForm));
   else {
     Task.createTask(filledForm.get());
     return redirect(routes.Application.getTasks());
   }
 }
示例#2
0
 public static Result tasks() {
   return ok(views.html.index.render(Task.all(), taskForm));
 }
示例#3
0
 public static Result getTasks() {
   return ok(task.render(Task.all(), taskForm));
 }