cadmy
cadmy

Reputation: 535

How to send strings to GWT DataGrid?

I have the method that carry out the data from the table. How could I pass these records to the datagrid of the google web toolkit?

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

Upvotes: 0

Views: 49

Answers (1)

Andrei Volgin
Andrei Volgin

Reputation: 41089

I suggest you read a tutorial on Cell widgets in GWT:

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

Upvotes: 1

Related Questions