未验证 提交 d844ce9c 编写于 作者: S Serge Rider 提交者: GitHub

Merge pull request #6944 from jacekszymanski/devel

add colspan so title line is above all columns not just first
......@@ -94,7 +94,7 @@ public class DataExporterHTML extends StreamExporterAbstract {
out.write("<body><table>");
out.write("<tr>");
writeTextCell(name, true);
writeTableTitle(name, columns.length);
out.write("</tr>");
out.write("<tr>");
for (int i = 0, columnsSize = columns.length; i < columnsSize; i++) {
......@@ -154,6 +154,20 @@ public class DataExporterHTML extends StreamExporterAbstract {
getWriter().write("</table></body></html>");
}
private void writeTableTitle(String value, int columns)
{
PrintWriter out = getWriter();
out.write(String.format("<th colspan=\"%d\">", columns));
if (value == null) {
out.write("&nbsp;");
}
else {
value = value.replace("<", "&lt;").replace(">", "&gt;").replace("&", "&amp;");
out.write(value);
}
out.write("</th>");
}
private void writeTextCell(String value, boolean header)
{
PrintWriter out = getWriter();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册