我有从表中执行数据的方法。我怎么能将这些记录传递给谷歌网络工具包的数据网格?
public void getAllGitRecords(){
try {
db = new ODatabaseDocumentTx(dbAdres);
db.open("admin", "admin");
try {
for (ODocument gitCommitsTable : db.browseClass("GitStorage")) {
//May be I should put the data in some container here?
//So what kind of container it could be?
System.out.print(gitCommitsTable.getRecord().getIdentity() + " | ");
System.out.print(gitCommitsTable.field("sha") + " | ");
System.out.print(gitCommitsTable.field("comment") + " | ");
System.out.print(gitCommitsTable.field("date") + " | ");
System.out.print(gitCommitsTable.field("h") + " | ");
System.out.print(gitCommitsTable.field("m") + " | ");
System.out.println(gitCommitsTable.field("l") + " | ");
}
} catch (IllegalArgumentException ex) {
System.out.println("The table GitStorage is empty");
}
} finally {
db.close();
}
}
答案 0 :(得分:1)
我建议你阅读关于GWT中Cell小部件的教程:
http://www.gwtproject.org/doc/latest/DevGuideUiCellWidgets.html