I’m develloping an application with Play Framework 2.0.
I have a filter section, which returns several results on a table, and on each row I have a Details button like this:
@(logList: List[Log])
@import helper._
@import helper.twitterBootstrap._
@title = {
Results...
}
@main(title, nav = "filter") {
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Date</th>
<th>Hour</th>
<th>Event</th>
</tr>
</thead>
<tbody>
@helper.form(action = routes.LogDetail.submit) {
@logList.map { log =>
<tr>
<td>@log.id</td>
<td>@log.date</td>
<td>@log.time</td>
<td>@log.event</td>
<td>
<input type="submit" class="btn primary" value="Details">
</td>
</tr>
}
}
</tbody>
</table>
}
What changes do I need to pass a row’s id as the row’s detail button is pressed?
Thanks
I don’t get why are you using form even if you don’t send anything? De facto for each row you should use separate form and use hidden field as Li-o showed you.
Instead it would be just easier to use common GET
In Twitter Bootstrap you can also display A link as button