Laurent T
Laurent T

Reputation: 1098

Which widget of a VerticalPanel has been clicked in GWT?

I have a post widget in a blog application which are stored in a VerticalPanel.

I want to know if it's possible to handle the click at the VerticalPanel and get the Post Widget which has been clicked?

EDIT: I'm also thinking about wrapping each Post in a custom Cell using this http://code.google.com/webtoolkit/doc/latest/DevGuideUiCustomCells.html so I can later paginate my posts. Is that a good idea? Is there a standard way to do that?

Thanks

Upvotes: 1

Views: 97

Answers (1)

Chris Cashwell
Chris Cashwell

Reputation: 22859

IMO, you'd be better off using a CellList with a Custom Cell describing each post. Two reasons for this:

  1. GWT's Cell Widgets are all capable of using a ListDataProvider (or better yet, an AsyncDataProvider) out of the box. You'd end up writing a great deal of code to get where they are.

  2. You can easily learn how to implement both a AsyncDataProvider and a CellList with a pager in a very short time from the GWT Showcase examples or other sources.

Upvotes: 2

Related Questions