0
我有从表中执行数据的方法。我如何将这些记录传递给Google网络工具包的数据网格?如何发送字符串到GWT DataGrid?
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();
}
}
这是服务器或客户端代码? – Akkusativobjekt
这是一个服务器代码 – cadmy
然后,您还必须先将数据传输到客户端。例如通过RCP(http://www.gwtproject.org/doc/latest/tutorial/RPC.html)。 – Akkusativobjekt