I'm using the following code to create a flextable:
FlexTable flexTable = new FlexTable();
FlexTable.FlexCellFormatter formatter = flexTable.getFlexCellFormatter();
flexTable.setCellSpacing(5);
flexTable.setCellPadding(3);
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(revision.author));
flexTable.setWidget(row,col++, new Label(revision.date));
flexTable.setWidget(row, col++, new Label(revision.status));
row++;
}
flexTable.setHTML(row-revisions.size(), 0, ticket);
formatter.setRowSpan(row-revisions.size(),0,revisions.size());
}
}
FlexTable.FlexCellFormatter formatter = flexTable.getFlexCellFormatter();
flexTable.setCellSpacing(5);
flexTable.setCellPadding(3);
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(revision.author));
flexTable.setWidget(row,col++, new Label(revision.date));
flexTable.setWidget(row, col++, new Label(revision.status));
row++;
}
flexTable.setHTML(row-revisions.size(), 0, ticket);
formatter.setRowSpan(row-revisions.size(),0,revisions.size());
}
}
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 google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/b6ded423-e38c-4ea7-9edd-9935df06147en%40googlegroups.com.
No comments:
Post a Comment