Dean Hiller
Dean Hiller

Reputation: 20210

simple routing on passing param in playframework

I have a route like so

GET  /projectinfo/{projectName}     premonitionx.Lists.projectInfo

which I use fine on some pages then on one page I have a table which iterates of some projects that you can click on so I have an "a href" like so...

<a href="@{Lists.projectInfo(inact.project.name)}">${inact.project.fullPath}</a>

This completely bombs in that it can't find the route....how to fix this(and hopefully use just the one route for all my pages to reuse). I am hoping I don't have to repeat routes cluttering up our routes file.

obviously my controller method is projectInfo(String projectName)

thanks, Dean

Upvotes: 0

Views: 124

Answers (1)

digiarnie
digiarnie

Reputation: 23455

I think you need to add permonitionx. as your package for your Lists class in the href:

@{premonitionx.Lists.projectInfo(inact.project.name)

Also, you could do this as well:

<a href="/projectinfo/${inact.project.name}">${inact.project.fullPath}</a>

Upvotes: 2

Related Questions