victorf
victorf

Reputation: 1048

Play! Framework Compilation Error - not found: value id

I'm using URI routing in Play! for the first time. That's what I have:

Well, that's it! What else could I check? Thank you!

Upvotes: 0

Views: 1507

Answers (1)

James Roper
James Roper

Reputation: 12850

When you refer to the routes.Contacts.edit route, you need to pass an id. Right now, it looks like you just copied the parameter declaration (eg id: Long) instead of choosing a meaningful id to pass.

Declare your title block to accept the id as a parameter, eg:

@title(id: Long) = {
  Add a new contact <small><a href="@routes.Contacts.edit(id)">Or edit an existing contact</a></small> 
}

Then when you use it, pass the id, eg:

@title(someId)

Upvotes: 2

Related Questions