Monday, November 16, 2020

Re: GWT adds empty cells when using rowspan


On Monday, November 16, 2020 at 12:24:11 PM UTC+2 wrote:
Because the cell on row=1,col=0 spans to the following rows, the cell that visually appears at row=2,col=1 is actually row=2,col=0 → you need to shift your columns down by 1.

Think of the HTML being generated:
<tr><td rowspan=3>lit-1</td><td>1</td>…</tr>
<tr>                        <td>2</td>…</tr>
<tr>                        <td>2</td>…</tr>

On Monday, November 16, 2020 at 8:30:49 AM UTC+1 test wrote:

On Monday, November 16, 2020 at 9:29:39 AM UTC+2 test wrote:

On Monday, November 16, 2020 at 8:43:39 AM UTC+2 test wrote:
Hi all,
I'm using the following code to create a flextable:

FlexTable flexTable = new FlexTable();
FlexTable.FlexCellFormatter formatter = flexTable.getFlexCellFormatter();
int row = 1, col=0;
flexTable.setWidget(0,col++,new Label("Ticket"));
flexTable.setWidget(0,col++,new Label("RevID"));
flexTable.setWidget(0,col++,new Label("Author"));
flexTable.setWidget(0,col++,new Label("Date"));
flexTable.setWidget(0,col++,new Label("Status"));
for (Result r : result.list){
for (String ticket : r.revs.keySet()){
List<Revision> revisions = r.revs.get(ticket);
for (Revision revision : revisions){
col = 1;
flexTable.setWidget(row, col++, new Label(String.valueOf(revision.revisionId)));
flexTable.setWidget(row, col++, new Label(;
flexTable.setWidget(row,col++, new Label(;
flexTable.setWidget(row, col++, new Label(revision.status));
flexTable.setHTML(row-revisions.size(), 0, ticket);

The result looks as follows:

As you can see, it adds an empty cell starting from the second row when using rowspan. What am I doing wrong?

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment