I get this error:
Compilation error [package views.json.Runs does not exist]
when it clearly exists. I can’t understand what I can do wrong.
action in the Runs
controller:
@BodyParser.Of(play.mvc.BodyParser.Json.class) public static Result view(Long task_id, Long run_id) { Run run = Run.find.byId(run_id); return ok(views.json.Runs.view.render(run)); }
app/views/Runs/view.scala.json
:
@(run: Run) { "started": "@run.started", "completed": "@run.completed" }
I got some html templates, but this is the first JSON template I tried with 2.0. I'm not sure what else to try, as this is already possible as thoroughly as possible. Does anyone have any ideas?
Update . I came up with a few suggestions on workarounds, but I'm still interested in learning how to make the templates work if I only better understand the 2.0 changes.
source share