【发布时间】:2012-07-03 21:59:21
【问题描述】:
我的 ui.xml 中有一个 HTML 小部件,我在 Uibinder 中使用它来填充数据,如下所示:
ui.xml ->
<g:HTML ui:field="operationsDetailTableTemplate" visible="false">
<table class="{style.LAYOUT_STYLE}" width="100%" border="1">
<tr>
<td><img src="images/indent-blue.gif"/></td>
<td>
<table class="{style.DEFAULT_STYLE}">
<thead>
<tr>
<th>OperationUuid</th>
....
</tr>
</thead>
<tbody>
<tr>
<td>%s</td>
...
</tr>
</tbody>
</table>
</td>
</tr>
....
</g:html>
Uibinder.java--->
String htmlText = operationsDetailTableTemplate.getHTML()
.replaceFirst("%s", toSafeString(operation.getOperationUuid()))
....
HTML html = new HTML(htmlText);
operationsDetail.add(html);
对于从数据库中检索到的每个操作,上述操作都是在 for 循环中完成的。 我的问题是如何为检索到的每个操作集在其中一个单元格(例如 operation id )上嵌入超链接或锚标记。我也希望有一个监听器。
附: - 它不允许我在 ui.xml 中使用 HTML 中的锚标记。
【问题讨论】:
标签: html gwt hyperlink anchor uibinder