Play tutorial shows a way to bind dynamic parameter to URL:
GET /clients/:id controllers.Clients.show(id: Long)
I want to do exactly the same thing in my app. But when I write GET /Category/getAttributes/:id controllers.Category.getAttributes(id) and go to http://localhost:9000/Category/getAttributes?id=4fce5fc51712ccf77afa7439 I receive Action not found error with my routes listed below. Proper route is there.
The question is: what am I missing? Routing in my PLay app works fine for other requests, this one is the only one with dynamic parameter.
Use
Stringtype, I doubt if4fce5fc51712ccf77afa7439can be considered as aLong:Of course don’t forget to fix the type of
idin your controllers and modelsEdit: Ech, I missed second important change, URL for this route should be without
?id=: