私は、listgrid に 100 個の要素をローカルに入力する (RPC やサーバーとのやり取りを伴わない) 非常に単純な SmartGWT アプリケーションを作成しています。
リストグリッドをスクロールすると、スクロール速度が著しく遅くなります
環境: SmartGWT 3.0 GWT 2.4.0
コードは次のとおりです。
public class RemoteFileBrowser implements EntryPoint {
// /**
// * The message displayed to the user when the server cannot be reached or
// * returns an error.
// */
// private static final String SERVER_ERROR = "An error occurred while "
// + "attempting to contact the server. Please check your network "
// + "connection and try again.";
//
// /**
// * Create a remote service proxy to talk to the server-side Greeting
// service.
// */
// private final RemoteFileServiceAsync greetingService = GWT
// .create(RemoteFileService.class);
/**
* This is the entry point method.
*/
public void onModuleLoad() {
//// SC.say("Welcome to remote file browser!");
// RemoteFileDialog rfDialog = new RemoteFileDialog("*.*, *.htm, *.cpp, *.hpp");
// rfDialog.show();
getListView().draw();
}
private ListGrid getListView() {
ListGrid grid = new ListGrid();
grid.setWidth(500);
grid.setHeight(400);
grid.setLeft(100);
grid.setTop(100);
ListGridField field1 = new ListGridField("name");
ListGridField field2 = new ListGridField("designation");
grid.setFields(field1, field2);
ListGridRecord[] records = new ListGridRecord[100];
for (int i=0; i<100; ++i) {
//ListGridRecord record = new ListGridRecord();
records[i] = new ListGridRecord();
GWT.log("Iteraton:" + i);
records[i].setAttribute("name", "name" + i);
records[i].setAttribute("designation", "designation" + i);
}
grid.setData(records);
return grid;
}
}
ショーケースの例はうまくいくようです。この問題は、データ ソースを設定せずにリスト グリッドをローカルに設定すると発生します。
私がこれを間違っているところはありますか?
助けてくれてありがとう。
よろしく、 RV