1
我試圖從數據庫表中加載記錄到Vaadin表。從數據庫獲取所有記錄到Vaadin表
我得到的所有記錄從表process
這樣的:
public ResultSet selectRecordsFromDbUserTable() throws SQLException {
Connection dbConnection = null;
Statement statement = null;
ResultSet rs = null;
String selectTableSQL = "SELECT * from process";
try {
dbConnection = getDBConnection();
statement = dbConnection.createStatement();
System.out.println(selectTableSQL);
// execute select SQL stetement
rs = statement.executeQuery(selectTableSQL);
} catch (SQLException e) {
System.out.println(e.getMessage());
} finally {
if (statement != null) {
statement.close();
}
if (dbConnection != null) {
dbConnection.close();
}
}
return rs;
}
而且它運作良好。在ResultSet rs
我得到我需要的所有行。
如何將它們加載到Vaadin Table
?
做得好添加容器性能
循環!完美的作品 – ilovkatie 2014-10-06 13:18:42