Demo app using the Scala Play framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

29 lines
434 B

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. package controllers
  2. import play.api._
  3. import play.api.mvc._
  4. import play.api.data._
  5. import play.api.data.Forms._
  6. import models.Task
  7. object Application extends Controller {
  8. val taskForm = Form(
  9. "label" -> nonEmptyText
  10. )
  11. def index = Action {
  12. Redirect(routes.Application.tasks)
  13. }
  14. def tasks = Action {
  15. Ok(views.html.index(Task.all(), taskForm))
  16. }
  17. def newTask = TODO
  18. def deleteTask(id:Long) = TODO
  19. }