Hi,
thank you very much. That solved the problem.
On 23 Mrz., 22:22, Alexandre Ardhuin alexandre.ardh...@gmail.com
wrote:
Hi,
I think you should use :
cellTable.setRowCount(result.size());
cellTable.setRowData(0, result);
instead of :
cellTable.setRowData(result);
Javadoc of
com.google.gwt.user.cellview.client.AbstractHasData.setRowData(List?
extends T) tells : Set the complete list of values to display on one
page.
Alexandre.
2011/3/22 Dovakhin o.fr...@freenet.de
Hi,
I have the following problem. I have a celltable with 2 columns. These
columns contain Filenames and their size.
Due to the fact that i have many files that i want to display I want
to use Paging. In my last project i used gwt 2.1 and the paging worked
there. The simplePager in GWT 2.2 does not work in my new project but
its still the same code that should work.
Can anyone show me where it goes wrong? Thanks.
Here´s my code reduced to the SimplePager things:
public class CellTableTestClass {
private VerticalPanel applicationPanel = new VerticalPanel();
private CellTableLogData cellTable = new CellTableLogData();
private SingleSelectionModelLogData selectionModel = new
SingleSelectionModelLogData();
public VerticalPanel createContent() {
LogFileServiceAsync initData = (LogFileServiceAsync)
GWT.create(LogFileService.class);
initData.getLogs(new AsyncCallbackList LogData() {
public void onFailure(Throwable caught) {
Window.alert(caught.getLocalizedMessage());
}
public void onSuccess(ListLogData result) {
cellTable.setRowData(result);
}
});
cellTable.setSelectionModel(selectionModel);
{
cellTable.addColumn(new TextColumnLogData() {
@Override
public String getValue(LogData object) {
return object.getLogName();
}
}, Log Name);
cellTable.addColumn(new TextColumnLogData() {
@Override
public String getValue(LogData object) {
return object.getSize();
}
}, Size);
}
// create a pager, giving it a handle to the CellTable
SimplePager.Resources pagerResources =
GWT.create(SimplePager.Resources.class);
SimplePager pager = new SimplePager(TextLocation.CENTER,
pagerResources, false, 0, true);
pager.setDisplay(cellTable);
pager.setPageSize(10);
// add the Pager to the dialog
applicationPanel.add(pager);
applicationPanel.add(new HTML(hr /));
applicationPanel.add(cellTable);
return applicationPanel;
}
}
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.