gpt4 book ai didi

java - 如何将字符串发送到 GWT DataGrid?

转载 作者:行者123 更新时间:2023-12-01 13:27:51 27 4
gpt4 key购买 nike

我有从表中执行数据的方法。我如何将这些记录传递到谷歌网络工具包的数据网格?

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();
}
}

最佳答案

我建议您阅读有关 GWT 中的 Cell 小部件的教程:

http://www.gwtproject.org/doc/latest/DevGuideUiCellWidgets.html

关于java - 如何将字符串发送到 GWT DataGrid?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21719444/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com