Play! framework link
-
26-06-2021 - |
Domanda
I got a List of Forums and I want to create a link for each one:
<ul>
@for(forum <- forums) {
<li>
<a href="@{Forums.show(forum.getId)}">@forum.getName()</a>
</li>
}
this it the result for the tag:
<a href="SimpleResult(200, Map(Content-Type -> text/html; charset=utf-8))">bla bla</a>
I thought it will produce a link, like in this tutorial:
http://www.playframework.org/documentation/1.0/firstapp
what change is need to be done?
Soluzione
OK. found the solution - it should be done like this:
<a href="@routes.Forums.show(forum.getId())">@forum.getName()</a>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow