Hi

I am new to both gwt and Java; but I am trying to use gwt to enhance
an
old web application, with using Ajax.

I have however run into an issue:

After a query to the database, I put the results in a table (I am
currently using
the supertable from cafesip; but have seen that there is also a good
table widget
in the incubator).

The problem is, that from the table, people need to be able to click
on a row, and
from there get to a detail page for that entry.

What I do now is:

private void setRow(final CslData csl){
                table.addRow(new Widget[] {new Button(csl.getSiteName(), new
ClickHandler() {
                        public void onClick(ClickEvent event) {
                                siteList(csl.getSiteKey());
                        }
                }), ..........

This adds an awful lot of clickhandlers, with one for each row, so I
am looking for a more elegant
way of doing this. (A way of using the same click handler, and only
passing the site key from
the row.). Also I would like to do this on a Label rather than putting
a button in the table.

Hope some can educate me in the best way of doing this.

(Also the app onlt works correctly the first two to three times a
table cell is clicked, I guess this
is due to memory issues from all the click handlers)

Thanks in advance for ant help.
Per

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

Reply via email to