这是我当前的代码片段,用于在 liferay 7 上的数据表中显示数据
<table id="gbdb" class="table table-bordered table-striped" style="width:100%">
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<c:forEach items="${guestbookList}" var="guestbook">
<tr>
<td>${guestbook.name}</td>
<td>${guestbook.status}</td>
<td><a href=/guestbookadminportlet/guestbook_actions.jsp></a></td>
</tr>
</c:forEach>
</tbody>
</table>
它当前能够显示名称和状态,但我希望引用 jsp 文件中的第三列,该按钮及其功能将位于其中。 我该如何相处??
最佳答案
根据我的理解,您希望在标记的最后一列中显示“guestbook_actions.jsp”文件中的代码。
您可以尝试直接在 td 代码中<%@ include file="file"%>
<td><%@include file="/guestbookadminportlet/guestbook_actions.jsp" %></td>
关于java - 如何在数据表条目中添加路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51018886/