CellList widget number cannot be over than 25
gwt
Solution
I always use the code below passing my CellTables and CellLists when I don't want pagination.
public static void setupOnePageList(final AbstractHasData<?> cellTable) {
cellTable.addRowCountChangeHandler(new RowCountChangeEvent.Handler() {
@Override
public void onRowCountChange(RowCountChangeEvent event) {
cellTable.setVisibleRange(new Range(0, event.getNewRowCount()));
}
});
}
Problem
I have working on CellList for weeks now and I find it owesome. Those days I wish to print a list that contains more than 70 elements but I noticed that my CellList doesn't append more than 25: from 0 to 24. To make sure that the problem has no relashionsip with my project, I decided to test the code in a new and clan project but It has the same result. Here is my code: ``` CustomCell bodyCell = new CustomCell(); CellList<String> coreCellList = new CellList<String>(bodyCell); List<String> list = new ArrayList<String>(); for (int i=0; i<74; i++) { list.add("hello_"+i); } coreCellList.setRowData(0, list); coreCellList.setRowCount(list.size(), true); RootPanel.get().add(coreCellList); ``` and CustomCell: ``` public class CustomCell extends AbstractCell<String> { interface Templates extends SafeHtmlTemplates { String style = "cell"; @SafeHtmlTemplates.Template("<div class=\"" + style + "\" style = 'height : 15%'>{0}<br/></div>") SafeHtml cell(SafeHtml value); } private static Templates templates = GWT.create(Templates.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, String value, SafeHtmlBuilder sb) { SafeHtml safeValue = SafeHtmlUtils.fromString(value); SafeHtml rendered = templates.cell(safeValue); sb.append(rendered); } } ``` Thank you for your help.