Monday, April 11, 2011

Re: How to show a HTML table

You would have to iterate through the ResultSet

int rowCnt = 0;

while(rs.next) {
int myIntValue = rs.getInt(1);
String myStringValue = rs.getString(2);

// and so on... for each of the values you want in the table.
// then you can add the values to the table.

int colCnt = 0;

flexTable(rowCnt, colCnt, new Label(myIntValue + ""));

colCnt = colCnt + 1;

flexTable(rowCnt, colCnt, new Label(myStringValue));

// and so on...
// at the end increment rowCnt to move down one row.

rowCnt = rowCnt + 1;

}

then add flexTable to whatever widget you want it to show up in.

Cheers,
David

On Apr 11, 3:04 pm, Ahrom <brah...@gmail.com> wrote:
> Thanks for your question.
>
> if i get:
>
> ResultSet rs = stmt.executeQuery( "SELECT * FROM MyTable" );
>
> i can set:
>
> flexTable.setWidget(0,0, rs)
>
> ??
>
> Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate