我正在用Play Framework 2.0開發一個應用程序。Play框架處理表信息
我有一個濾波部分,其在表上返回幾個結果,並在每一行我有一個這樣的詳細信息按鈕:
@(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>
}
做什麼樣的變化,我需要傳遞一個行的id作爲該行的細節按鈕被按下?
感謝
去爲無國籍/ REST類型的解決方案。在URL /路線中設置ID。 –
事實上,如果他沒有發送任何數據,他應該使用GET。 –