Exemple #1
0
 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());
   }
 }
Exemple #2
0
 public static Result deleteTask(Long id) {
   Task.delete(id);
   return redirect(routes.Application.tasks());
 }
Exemple #3
0
 public static Result index() {
   return redirect(routes.Application.tasks());
 }