【发布时间】:2015-05-12 04:12:07
【问题描述】:
您好,我正在尝试将内联编辑的表值作为参数传递给播放路线,有人可以帮助我吗? 这是我的html代码
<table class="gradienttable">
<thead>
<tr>
<th>Task</th>
<th>TimeSheetdate</th>
<th>Hours</th>
<th>IsBilled</th>
<th>Work Place</th>
</tr>
</thead>
<tbody>
@for(element <- CurrentPage) {
<tr>
<td contenteditable="true" id="task1">@element.getTask()</td>
<td>@element.getTimeSheetDate()</td>
<td contenteditable="true" id="hours">@element.getHours()</td>
<td contenteditable="true" id="isbilled">@element.getIsBilled()</td>
<td contenteditable="true"id="workplace">@element.getWorkPlace()</td>
<td><a href="@{routes.Application.edit(task1.innerHTML)}" ><img src="@routes.Assets.at("images/edit.jpg")" alt="EDIT" style="width:20px;height:20px"></a>
</tr>
}
</tbody>
</table>
路线
GET /Application/edit controllers.Application.edit(task1:String)
应用程序.java
public static Result edit(String task1)
{
return ok(DisplayTimeSheet.render(task1));
}
【问题讨论】:
-
你能做个小提琴吗?
标签: html playframework routes