Attach a ClickHandler to a CellTable row

1605 views
Skip to first unread message

Matias

unread,
Dec 27, 2010, 7:04:16 AM12/27/10
to Google Web Toolkit
Could somebody provide an example or any instructions on how to listen
for a click event on a CellTable row?

I want to have the same behavior of for example, gmail, when you click
on any mail on the inbox and you get the detail/conversation of that
mail.

Thanks!

Gal Dolber

unread,
Dec 27, 2010, 11:38:54 AM12/27/10
to google-we...@googlegroups.com
You need to use a SingleSelectionModel.

SingleSelectionModel mySelectionModel = new SingleSelectionModel<Mode>();

table.setSelectionModel(mySelectionModel);
mySelectionModel.addSelectionChangeHandler(mySelectionChangeHandler);


--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/




rlhawk1

unread,
Jan 14, 2011, 4:37:52 PM1/14/11
to Google Web Toolkit
I'm confused about rather this this code should be in the view or the
presenter? It kindof seems like it'd have to be in the view, but the
presenter seems like a more appropriate place for it.

On Dec 27 2010, 11:38 am, Gal Dolber <gal.dol...@gmail.com> wrote:
> You need to use a SingleSelectionModel.
>
>     SingleSelectionModel mySelectionModel =
> new SingleSelectionModel<Mode>();
>    table.setSelectionModel(mySelectionModel);
> mySelectionModel.addSelectionChangeHandler(mySelectionChangeHandler);
>
>
>
>
>
>
>
>
>
> On Mon, Dec 27, 2010 at 9:04 AM, Matias <matiassu...@gmail.com> wrote:
> > Could somebody provide an example or any instructions on how to listen
> > for a click event on a CellTable row?
>
> > I want to have the same behavior of for example, gmail, when you click
> > on any mail on the inbox and you get the detail/conversation of that
> > mail.
>
> > 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-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> > .

rlhawk1

unread,
Jan 17, 2011, 5:18:18 PM1/17/11
to Google Web Toolkit
Reply all
Reply to author
Forward
0 new messages