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 -&gt; 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?

È stato utile?

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
scroll top