What should I do that GWT use <th> instead of <td>?
Posted
by Paulus
on Stack Overflow
See other posts from Stack Overflow
or by Paulus
Published on 2009-12-30T07:27:44Z
Indexed on
2010/05/23
6:10 UTC
Read the original article
Hit count: 247
gwt
To build a HTML table I use direct DOM instead of a predefined Widget to set thead and tbody. But when I insert a cell with the insertCell() method GWT inserts an td element but should insert an th element.
So
TableElement table = Document.get().createTableElement();
TableSectionElement thead = table.createTHead();
TableRowElement headRow = thead.insertRow(-1);
headRow.insertCell(-1).setInnerText( "header1" );
gives
table/thead/tr/td
but should give
table/thead/tr/th
Any idea how to solve this problem? Use the "old-school" DOM.createXXX()-Methods?
© Stack Overflow or respective owner