I can solve this by extending the CellList and creating my own template + overriding the renderRowValues method. Just changing divs to spaces did not help me, maybe this is because I have custom cells (each cell is displayed as a table). Adding a display: inline CSS didn't work for me either.
My template code is pretty much the same as the original, except I added "float: left;" style:
interface Template extends SafeHtmlTemplates {
@Template("<div onclick=\"\" __idx=\"{0}\" style=\"float:left;\">{1}</div>")
SafeHtml span(int idx, SafeHtml cellContents); ...
Here is a snippet of my renderRowValue method:
int length = values.size();
int end = start + length;
for (int i = start; i < end; i++) {
SingleKeyValueModel value = values.get(i - start);
SafeHtmlBuilder cellBuilder = new SafeHtmlBuilder();
Context context = new Context(i, 0, getValueKey(value));
cell.render(context, value, cellBuilder);
sb.append(TEMPLATE.span(i, cellBuilder.toSafeHtml()));
}
source
share