I've problem, I Always get the following error: "Action not found for request 'Get /neerslag/'". This is my routes file:
GET / controllers.Application.index()
POST /neerslag controllers.Application.saveNeerslag()
GET /neerslag controllers.Application.getAllNeerslag()
GET /neerslag/:id controllers.Application.getNeerslag(id:Long)
GET /neerslag/form controllers.Application.showForm()
The "/" path works but none of the other works.
Here is my Application.java:
public static Result index() {
return ok(index.render("text"));
}
public static Result saveNeerslag(){
Neerslag neerslag = Form.form(Neerslag.class).bindFromRequest().get();
neerslag.save();
return redirect(routes.Application.index());
}
public static Result getAllNeerslag(){
List<Neerslag> alleNeerslag = new Model.Finder(String.class, Neerslag.class).all();
return ok(overview.render(alleNeerslag));
}
public static Result showForm(){
Form<Neerslag> internalForm = Form.form(Neerslag.class);
return ok(neerslagform.render(internalForm));
}
public static Result getNeerslag(Long id){
Neerslag result = new Model.Finder<>(String.class, Neerslag.class).byId(""+id);
return ok(neerslagDetail.render(result));
}
I tried the "play clean" and "play compile" command but this doesn't solve the error.
return TODO;, to see whether the problem is in therouteor yourreturn. - Bla...app foldertree-view... I guess the error is in this partoverview.render(alleNeerslag), it should be like thisviews.html.index.render(alleNeerslag)depends on how you put your files.. - Bla...