Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play! framework link

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?

like image 236
socksocket Avatar asked Sep 23 '26 11:09

socksocket


1 Answers

OK. found the solution - it should be done like this:

<a href="@routes.Forums.show(forum.getId())">@forum.getName()</a>
like image 66
socksocket Avatar answered Sep 25 '26 01:09

socksocket



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!